posts - 75,comments - 83,trackbacks - 0
<iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe>

方案一:用iframe的name属性定位
     <input type="button" name="Button" value="Button"
onclick="document.frames('ifrmname').location.reload()">


<input type="button" name="Button" value="Button"
onclick="document.all.ifrmname.document.location.reload()">

方案二:用iframe的id属性定位
<input type="button" name="Button" value="Button"
onclick="ifrmid.window.location.reload()">

终极方案:当iframe的src为其它网站地址(跨域操作时)
<input type="button" name="Button" value="Button"
onclick="window.open(document.all.ifrmname.src,'ifrmname','')">

posted on 2010-10-26 15:07 梓枫 阅读(280) 评论(0)  编辑  收藏 所属分类: html

只有注册用户登录后才能发表评论。


网站导航: