可以的。
b.htm
<html>
<script language=javascript>
function ChangeWidth()
{
var ifrm=window.parent.document.all.ifrmA;
ifrm.height="200";
}
</script>
<input type=button value="change" onclick="javascript:ChangeWidth();">
</html>
b.htm
<html>
<script language=javascript>
function ChangeWidth()
{
var ifrm=window.parent.document.all.ifrmA;
ifrm.height="200";
}
</script>
<input type=button value="change" onclick="javascript:ChangeWidth();">
</html>
解决方案 »
- 关于jQuery的$ is not defined问题
- 好纠结啊,到底是用服务端编程好,还是用jquery编程?哪个更佳?
- JS树"造成该页上的脚本造成Internet Explorer 运行速度减慢.如果继续运行,您的计算机将变的更慢.是否取消该脚本?"问题:高手请进
- 如何刷新指定面页?谢谢大家
- 播放器怎么从原唱切换到伴奏
- 应该是一个简单的问题
- 麻烦大家看看我的网站还需要什么改进的,谢谢
- 在线等待----怎样将弹出来的页面真正最大化
- ■■请教:如何使页面中的TABLE的行高、列宽固定,不让文本内容撑大它,如何做到呢?请给例子■■
- 有关数据在客户端两个窗口之间传输的问题
- 救急请教:javascript对Table的操作!!在线等待
- 请问如何让文本框禁止粘贴????
跨域时用以下方法:
b.html:<html> <input type=button value="change" onclick="javascript:ChangeWidth();">
<script language=javascript>
function ChangeWidth()
{
window.resizeTo(200,300);
}
</script>
</html>
/**
* 自适应页面。当页面被载入到frame中时,根据页面的实际大小,更改frame的大小。
* thisObj: frame框架的名字
* 需填写名字,而不是this引用。
*/
function AutoFit(thisObj){
if(thisObj.location != top.loaction){
is :"+thisObj.document.body.scrollHeight);
thisObj.height = thisObj.document.body.scrollHeight +30;
document.all(thisObj.name).height=thisObj.document.body.scrollHeight +30;
}
}
</script>html.代码:
<iframe
id='mainframe'
name='mainframe'
src='' width='100%' height='100%' scrolling='no'
onLoad='AutoFit(mainframe)'>
</iframe>
你是想要怎样调节??用户自己调节还是你啊?
a.htm是可户页面 b.htm是自己的
如果在b.htm能调节最好