在分辨率为124*768下测试通过:
<body>
<script>
alert(document.body.offsetWidth+','+document.body.offsetHeight);
window.open('1.htm','','width='+(parseInt(document.body.clientWidth)+20)+',height='+(parseInt(document.body.clientHeight)+94))
</script>
</body>
<body>
<script>
alert(document.body.offsetWidth+','+document.body.offsetHeight);
window.open('1.htm','','width='+(parseInt(document.body.clientWidth)+20)+',height='+(parseInt(document.body.clientHeight)+94))
</script>
</body>
1024*768分辨率下通过:
<body>
<script>
window.open('1.htm','','width='+(parseInt(document.body.clientWidth)+20)+',height='+(parseInt(document.body.clientHeight)+94))
</script>
</body>
<input type=button onclick="open1();" value="open1">
<script type="text/javascript">
function open1(){
document.getElementById("if1").style.display='';
document.getElementById("if1").style.height=document.getElementById("if1").Document.body.scrollHeight;
document.getElementById("if1").style.width=document.getElementById("if1").Document.body.scrollWidth;
var height=document.getElementById("if1").style.height;
var width=document.getElementById("if1").style.width;
window.open('1.htm','','width='+width+',height='+height);
document.getElementById("if1").style.display='none';
}
</script>
http://www.txsec.com/f10/f10-dmcx.asp?flag=2&type1=f10-2.asp&code=jt
点查看更名详情