可以的。
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一样包装的JavaScript对象
- 通过enent取得触发事件的ID属性
- 模态窗口禁缓存一问
- 发布用于JavaScript调试的小工具(jsTrace)
- 网页下拉列表框的问题
- PageDown 键被我使用了,如何取消 IE 原本内定的动作。
- 通过数据库取值,如果使数值相等的radio初始化被选中。我想通过循环判断实现。
- 求js多维数组如何自动累加信息
- 百度ueditor中复制word图文时图片转存任然保持灰色不可用,谁能教我怎么解决?
- 救急请教: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能调节最好