關(guān)于頁面刷新和iframe刷新
1.頁面中刷新? window.location.reload();2.iframe刷新
<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()">
?
終極方案:當(dāng)iframe的src為其它網(wǎng)站地址(跨域操作時)
<input type="button" name="Button" value="Button"
onclick="window.open(document.all.ifrmname.src,'ifrmname','')">
posted on 2009-06-24 00:31 tobyxiong 閱讀(2786) 評論(0) 編輯 收藏 所屬分類: show page