Kri*_*mar 1 javascript jquery dom
可能重复:
使用jQuery重新加载iframe
如何<iframe>在点击事件上重新加载?
我尝试过这个,但它不起作用:
jQuery("#link").click(function(){
jQuery('#iframeID')[0].reload();
})
Run Code Online (Sandbox Code Playgroud)
像这样
document.getElementById('iframeID').contentWindow.location.reload();
Run Code Online (Sandbox Code Playgroud)
或通过
document.getElementById('iframeID').src = document.getElementById('iframeID').src;
Run Code Online (Sandbox Code Playgroud)