【转】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

学如逆水行舟,不进则退。
原文地址:https://www.cnblogs.com/dhsx/p/4803428.html