【转】js/jquery中刷新iframe方法(兼容主流)

一。js实现刷新两种方式: 

1.//方法1
2.document.getElementById('FrameID').contentWindow.location.reload(true);
3.//方法2
4.document.getElementById('youriframe').src=src;

 

二。jquery实现强制刷新

 

$('#iframe').attr('src', $('#iframe').attr('src'));

 

总结:网上一大堆document.frames('ifrmname').location.reload()已经不能用了

转自:http://yanue.net/post-143.html

posted @ 2015-09-12 19:01  稻禾盛夏  阅读(177)  评论(0)    收藏  举报