Yangjinghuan 发表于 2013-2-7 16:05:08

刷新iframe的方法

1.如:<iframe src="1.htm" name="myIframeName" id="myIframeID"></iframe>

方法一:
       <input type="button" name="Button" value="Button" myIframeName").location.reload()">

方法二:
       <input type="button" name="Button" value="Button"
>

方法三:
       <input type="button" name="Button" value="Button"
>

方法四(适于跨域操作):
       <input type="button" name="Button" value="Button"
>

2.Iframe 实现AJAX请求
      var iframeObj = document.getElementById("myIframeID");   
                iframeObj.src="b.html";
页: [1]
查看完整版本: 刷新iframe的方法