1. jquery 实现iframe刷新
html代码:
<iframe id="myframe" width="100%" frameBorder="0" src="test.html" scrolling="no"></iframe>
jquery代码:
$('#myframe').attr('src', $('#myframe').attr('src'));
2.js 实现iframe刷新
html代码:
<iframe id="myframe" width="100%" frameBorder="0" src="test.html" scrolling="no"></iframe>
js 代码:
document.getElementById('myframe').contentWindow.location.reload(true);