javascript
JS实现刷新iframe的方法
?來源:http://www.okajax.com/a/200808/0R2OZ2008.html
?
<iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe>
方案一:用iframe的name屬性定位
 ???? <input type="button" name="Button" value="Button" 
 οnclick="document.frames('ifrmname').location.reload()"> 
或
 <input type="button" name="Button" value="Button" 
 οnclick="document.all.ifrmname.document.location.reload()"> 
方案二:用iframe的id屬性定位
 <input type="button" name="Button" value="Button" 
 οnclick="ifrmid.window.location.reload()"> 
終極方案:當iframe的src為其它網站地址(跨域操作時)
 <input type="button" name="Button" value="Button" 
 οnclick="window.open(document.all.ifrmname.src,'ifrmname','')"> 
總結
以上是生活随笔為你收集整理的JS实现刷新iframe的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 正则基础之 NFA引擎匹配原理
- 下一篇: request.getParameter
