iframe的刷新方式
1. 刷新方式可以使用 javascript 的 document.fr.location.reload()
2. 还有就是修改 document.fr.location.href 也可以实现刷新的功能
例如:
注意:千万不要两种方式同时使用,如果同时使用,将会提交两次。
1. 刷新方式可以使用 javascript 的 document.fr.location.reload()
2. 还有就是修改 document.fr.location.href 也可以实现刷新的功能
例如:
<iframe name="fr" width="96%" src="alert_search.do?method=findSys"></iframe>
<script type="text/javascript">
function show_syslog(id){
document.fr.location.href="/alert_search.do?method=findSys&id="+id;
}
</script>
<input type="button" onclick="javascript:show_syslog(1)">注意:千万不要两种方式同时使用,如果同时使用,将会提交两次。
document.fr.location.href = "your.html";
document.fr.location.reload();
本文深入探讨了iframe的刷新机制,包括使用javascript的location.reload()方法和修改location.href属性实现页面刷新,强调避免同时使用这两种方法以免导致重复提交。

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



