asp.net div与嵌套iframe 调整高度的问题 30
我是这么写的请各位大哥帮忙!varstrs=ButtonName.split("_");varobjDiv=document.getElementById(strs[0]...
我是这么写的 请各位大哥帮忙!
var strs = ButtonName.split("_");
var objDiv = document.getElementById(strs[0]);
objDiv.style.top = 53;
objDiv.style.left = 0;
objDiv.style.width = document.body.clientWidth ;
objDiv.style.height = document.body.clientHeight ;//window.screen.availHeight / document.body.clientHeight /document.body.offsetHeight / window.screen.height
//window.screenTop 缃戦〉姝f枃鍏ㄦ枃楂桡细document.body.scrollHeight 缃戦〉琚�嵎铡荤殑楂桡细document.body.scrollTop
var iframe = document.getElementById('ifram'+ strs[0]);
//iframe.height = document.body.clientHeight-100;
alert(document.body.clientHeight);
iframe.height = document.body.clientHeight-123;
alert(objDiv.style.height);
alert(iframe.height);
// alert(window.screen.availHeight);
// alert(document.body.clientHeight);
// alert(document.body.offsetHeight);
// alert(window.screen.height); 展开
var strs = ButtonName.split("_");
var objDiv = document.getElementById(strs[0]);
objDiv.style.top = 53;
objDiv.style.left = 0;
objDiv.style.width = document.body.clientWidth ;
objDiv.style.height = document.body.clientHeight ;//window.screen.availHeight / document.body.clientHeight /document.body.offsetHeight / window.screen.height
//window.screenTop 缃戦〉姝f枃鍏ㄦ枃楂桡细document.body.scrollHeight 缃戦〉琚�嵎铡荤殑楂桡细document.body.scrollTop
var iframe = document.getElementById('ifram'+ strs[0]);
//iframe.height = document.body.clientHeight-100;
alert(document.body.clientHeight);
iframe.height = document.body.clientHeight-123;
alert(objDiv.style.height);
alert(iframe.height);
// alert(window.screen.availHeight);
// alert(document.body.clientHeight);
// alert(document.body.offsetHeight);
// alert(window.screen.height); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询