zoukankan      html  css  js  c++  java
  • iframe如何刷新的三种解决方案

    摘自:aehyok 

    <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','')">

  • 相关阅读:
    Codeforces 526D Om Nom and Necklace (KMP)
    HDU
    HDU
    Codeforces 219D
    HDU
    HDU
    POJ
    HDU
    HDU
    第二次作业
  • 原文地址:https://www.cnblogs.com/lei2007/p/3010524.html
Copyright © 2011-2022 走看看