用JavaScript設置寬度高度爲100%

有的時候會有特殊狀況須要用js來設置寬度高度爲100%,代碼以下:javascript <script type="text/javascript"> function init(){ var a=document.getElementById("test"); a.style.width="100%"; a.style.height="100%"; } window.onload=init; <
相關文章
相關標籤/搜索