function refreshIframe() {
var ifr = document.getElementsByName('rightTrail')[0];
ifr.src = ifr.src;
}
<iframe id="rightTrail" name="rightTrail" scrolling="no" src="resources/JSP/RightTable.jsp" class="col last" width="300px" frameborder="0">
</iframe>
<div style="float: left;">
<button id="refershButton" type="button" onclick="refreshIframe()">Get The Latest Data</button>
</div>
以上刷新iframe的代码在Chrome中工作正常而不是在IE中。请帮助
答案 0 :(得分:0)
请尝试:
的document.getElementById( '的iFrame')contentDocument.location.reload(真);