<input onclick="test()" type=button value="改尺寸"><br>
<iframe id=mxh src="http://sohu.com"></iframe>
<script>
function test()
{
document.all.mxh.style.height='500'
document.all.mxh.style.width='780'
}
</script>
<iframe id=mxh src="http://sohu.com"></iframe>
<script>
function test()
{
document.all.mxh.style.height='500'
document.all.mxh.style.width='780'
}
</script>
在子页面里用<body onload="self.resizeTo(780,500)">看看,我没有试验
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY onload="test()">
<script>
function test()
{
window.resizeTo(document.body.clientWidth,document.body.clientHeight)
alert("ff")
}
</script></BODY>
</HTML>
================================
<iframe id=mxh src="http://joyroot/Resources/s.htm"></iframe>http://joyroot/Resources/s.htm文件如下:
==========================================
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY onload="test()">
<script>
function test()
{
window.resizeTo(document.body.clientWidth + 20,document.body.clientHeight + 20)}
</script>
<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test</BODY>
</HTML>
<BODY onload="test()">
<script>
function test()
{
window.resizeTo(document.body.scrollWidth+20,document.body.scrollHeight+20)
}
</script>