亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長(zhǎng)資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    javascript怎么設(shè)置高

    javascript設(shè)置高的方法:首先獲取指定id的element;然后得到“p_count”目前的高;最后通過(guò)“$("p_count").style.height="900"+"px";”設(shè)置定高即可。

    javascript怎么設(shè)置高

    本文操作環(huán)境:windows7系統(tǒng)、javascript1.8.5版、Dell G3電腦。

    javascript怎么設(shè)置高?

    js設(shè)置指定div的高度

    代碼如下:

    <script type="text/javascript"> function $(id){ //獲指定id的element,方法形如jQuery return document.getElementById(id); } function getHeight(){ var a=$("p_count").offsetHeight; //得到p_count目前的高 if(a>1000) { //alert(a); } else{ $("p_count").style.height="900"+"px"; //設(shè)定定高 } } window.οnlοad=function(){ getHeight(); } </script> <div id="p_count" style="border:1px solid #ccc">lalala</div>

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)