iframe 的刷新方式,这样方式更方便。
iframe的刷新方式
-
刷新方式可以使用 javascript 的 document.fr.location.reload()
-
还有就是修改 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();
提交过一次的form,怎么不提交刷新?
让iframe进来的页面自己刷新不就行了吗? 用
谢谢,我正需要。
可以回复了吗?不关小黑屋了?
做技术的人。。。。
国外出差的路过。。。。
如果iframe中存在form表单,并且提交过一次,这种刷新都会提示重复提交。 大年初一啦,给大家拜年。
我是用 document.fr.src="/alert_search.do?method=findSys&id="+id的,这样不好吗?