亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript控制DIV樣式

??? 2018-12-16 17:37:46 180
????:<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <sty

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title></title>

<style type="text/css">

#box{width: 100px;height: 100px;background: red;margin: 20px 80px;}

</style>

</head>

<body>

<!-- 用按鈕控制DIV的高度、寬度、顏色、重置、贏藏、顯示 -->

<script type="texe/javascript">

var box

window.onload=function(){

box=document.getElementById("box")

}

function aa(){

box.style.height="400px;"//改變高度

}

function aa(){

box.style.width="400px;"//改變寬度

}

function aa(){

box.style.background="pink" //改變顏色

}

function aa(){

box.style.background="pink"        

}

</script>

<div id="box"></div>

<input type="button" value="變高">

<input type="button" value="變寬">

<input type="button" value="變色">

<input type="button" value="重置">

<input type="button" value="贏藏">

<input type="button" value="顯示">


</body>

</html>


?? ???:天蓬老師?? ??:2018-12-16 17:42:20
???? ??:總體思路是對(duì)的,不過(guò)運(yùn)行是有問(wèn)題的,函數(shù)都重名了。還有:js語(yǔ)句后面加上“;”

??? ??

?? ??