Warning: file_put_contents(): Only 0 of 33 bytes written, possibly out of free disk space in /home/rootlau/public_html/wp/wp-content/plugins/ezpz-one-click-backup/functions/ezpz-ocb-functions.php on line 1351
ROOTLAU.COM » iframe
  • Twitter
  • rss
  • facebook

緊隨 ROOTLAU.COM 的最新消息和資訊

Adjust width height of iframe to fit with content in it

(0)

Category : 網頁設計

<script language=”JavaScript”>
<!–
function autoResize(id){
var newheight;
var newwidth;

if(document.getElementById){
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
}

document.getElementById(id).height= (newheight) + “px”;
document.getElementById(id).width= (newwidth) + “px”;
}
//–>
</script>

<IFRAME SRC=”usagelogs/default.aspx” width=”100%” height=”200px” id=”iframe1″ marginheight=”0″ frameborder=”0″ onLoad=”autoResize(‘iframe1′);”></iframe>