我需要一个解决方案来刷新适用于不同浏览器的iframe。
你能证实,我在互联网上找到的代码是正确的或给我正确的JavaScript?Javascript:刷新IFrame浏览器特定
IE 7 window.document.getElementById('iframeId').contentWindow.location.reload(true);
IE 8 window.document.getElementById('iframeId').contentWindow.location.reload(true);
IE 9 window.document.getElementById('iframeId').contentWindow.location.reload(true);
火狐12-17
window.document.getElementById('iframeId').src = window.document.getElementById('iframeId').src;
铬 document.getElementById('iframeId').contentWindow.location.reload();
Chrome现在
???
Safari和Opera会很好,但以上都很重要。 iframe可能位于不同的域中。
非常感谢提前!
喜做这项工作的IE版本?我尝试按照此处所述使用,但无法重新加载iFrame。 – Coder