刷新iframe在Chrome中不在IE中工作

时间:2014-01-12 02:15:23

标签: javascript iframe

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中。请帮助

1 个答案:

答案 0 :(得分:0)

请尝试:

的document.getElementById( '的iFrame')contentDocument.location.reload(真);

相关问题