<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>
解决方案 »
- 用PHP写网页原来能用的JS现在却不能用了
- 求一款能兼容IE和火狐的滤镜图片切换效果DEMO,谢谢了。
- prototype对数组的扩展和for语法造成冲突怎么解决?
- ajax高手指点下菜鸟啊我正在看prototype.js
- jsp超级链接传中文(救命实在想不出为什么了)
- select option的问题,类似于title的效果
- 求助一个关于mousedown和mouseup事件响应的问题
- id和name的区别
- 不同的页面如何相互调用对方的js函数??
- 为什么alert(document.getElementById("XXX").style.opacity)弹出来的对话框上什么也没有?
- 打开窗口不失去焦点问题???
- 从论坛中搜索了如何将窗口右上角的三个按钮:“最大化”“最小化”“关闭”禁止,可是?????
在子页面里用<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>