请问如果我想在iframe所包含的叶面对iframe的高度作调整,该如何实现?
如果主页面和iframe叶面是相同域名下的叶面就能够正常的调整这个iframe的高度。但如果所包含的叶面指向其他域名的时候,就出现拒绝访问的错误了。
谁能告诉我一个可行的方法来在子页面中写代码调整iframe的高度?
在线等待!
---------------------------------------------------------------
用法:
http://xxx.com/test.htm文件如下:
1<iframe id="mxh" src="http://joyroot/Resources/s.htm"></iframe>
http://joyroot/Resources/s.htm文件如下:
1<html>
2<head>
3<meta content="Microsoft Visual Studio 6.0" name="GENERATOR"/>
4<title></title>
5</head>
6<body onload="test()">
7<script>
8function test()
9{
10window.resizeTo(document.body.clientWidth + 20,document.body.clientHeight + 20)
11
12}
13</script>
14<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test<p>test
15
16</p></p></p></p></p></p></p></p></p></p></p></p></body>
17</html>