iframe auto resize in aspx files with vb.net codebehind
I put in the iframe tag as follows in my .aspx page -
Now what code do i put in javascript or vb.net to make this auto resizable depen开发者_如何学运维ding on the size of the page that comes in?
From Matt Cutts
window.onload = function(){
var child = document.getElementById('child-iframe-id');
child.style.height = child.contentWindow.document.body.scrollHeight + 'px';
}
NOTE: If your child content window comes from a different domain as the parent, this likely won't work correctly, or reliably.
精彩评论