<div class="wrapper">
<div class="left-wrapper"></div>
<div>
<iframe id="right-wrapper" src="./test5.html" frameborder="0"></iframe>
</div>
</div>
<script>
document.getElementById('right-wrapper').contentWindow.location.reload(true)
</script>
更新iframe页面
最新推荐文章于 2025-12-04 22:56:41 发布
该代码段展示了如何使用JavaScript的`contentWindow`属性和`location.reload()`方法来刷新一个嵌入在页面中的iframe的内容。它指向了`test5.html`这个页面。
1万+

被折叠的 条评论
为什么被折叠?



