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

很艱難的啃著這塊js燒餅(英文單詞記不住,個(gè)人感覺)

原創(chuàng) 2019-02-21 17:07:03 258
摘要:<!DOCTYPE html><html><head> <title>js控制div</title> <style type="text/css"> #box{width:150px;height:150px;background:#ccc;text-align:center;margin:20px 65p

<!DOCTYPE html>

<html>

<head>

<title>js控制div</title>

<style type="text/css">

#box{width:150px;height:150px;background:#ccc;text-align:center;margin:20px 65px}



</style>

</head>

<body>


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

<input type="button" value="變高" onclick="zg()">

<input type="button" value="變寬" onclick="zk()">

<input type="button" value="變色" onclick="bs()">

<input type="button" value="變圓角" onclick="byj()">

<input type="button" value="重置" onclick="cz()">

<input type="button" value="隱藏" onclick="yc()">

<input type="button" value="顯示" onclick="xs()">

<input type="button" value="寫入" onclick="xr()">

<input type="button" value="換圖" onmouseover="ys()">

<input type="hidden" id="imgsrc">


<script type="text/javascript">

    var box

window.onload=function (){


      box=document.getElementById("box")

      

}

function zg(){

      box.style.height="300px"

      

      }

     function zk(){

      box.style.width="300px"



     }

     function bs(){


     box.style.background="red"


     }

     function cz(){

      box.style.width="150px"

      box.style.height="150px"

      box.style.background="#ccc"

      box.style.borderRadius="0px"

      box.innerHTML=""

     }

     function yc(){

       box.style.display="none"


     }

     function xs(){

      box.style.display="block"



     }

     function byj(){

      box.style.borderRadius="50px"



     }

     function xr(){


      box.innerHTML="<img id='image'src='images/timg.jpg' onmouseover='overs()' onmouseleave='leaves()'/>"

      box.style.textAlign="center"

      box.style.lineHeight="150px"


     }

     function ys(){

       document.getElementById('image').src="images/1.jpg"

        


     }

     function overs(){

document.getElementById('imgsrc').value = document.getElementById('image').src;

document.getElementById('image').src = 'images/timg.jpg';

}


// 鼠標(biāo)移出img

function leaves(){

document.getElementById('image').src = document.getElementById('imgsrc').value;

}

</script>

</script>


</body>

</html>

經(jīng)過老師指導(dǎo)才知道鼠標(biāo)移上元素和移出元素可以這樣用,謝謝勒,下一步就是多多練習(xí)剩余的獲取方式,主要是單詞記不住,老容易忘記需要查書冊(cè),問老師,我感覺還是不熟練


批改老師:韋小寶批改時(shí)間:2019-02-21 17:29:26
老師總結(jié):?jiǎn)卧~記不住很正常 哪有能把所有單詞都記住的呢 要知道怎么去查就可以了

發(fā)佈手記

熱門詞條