1.如:<iframe src="1.htm" name="myIframeName" id="myIframeID"></iframe>
方法一:
<input type="button" name="Button" value="Button" οnclick="document.frames("myIframeName").location.reload()">
方法二:
<input type="button" name="Button" value="Button"
οnclick="document.all.ifrmname.document.location.reload()">
方法三:
<input type="button" name="Button" value="Button"
οnclick="ifrmid.window.location.reload()">
方法四(适于跨域操作):
<input type="button" name="Button" value="Button"
οnclick="window.open(document.all.ifrmname.src,'myIframeName','')">
2.Iframe 实现AJAX请求
var iframeObj = document.getElementById("myIframeID");
iframeObj.src="b.html";
方法一:
<input type="button" name="Button" value="Button" οnclick="document.frames("myIframeName").location.reload()">
方法二:
<input type="button" name="Button" value="Button"
οnclick="document.all.ifrmname.document.location.reload()">
方法三:
<input type="button" name="Button" value="Button"
οnclick="ifrmid.window.location.reload()">
方法四(适于跨域操作):
<input type="button" name="Button" value="Button"
οnclick="window.open(document.all.ifrmname.src,'myIframeName','')">
2.Iframe 实现AJAX请求
var iframeObj = document.getElementById("myIframeID");
iframeObj.src="b.html";