刷新jsp页面 [英] refreshing the jsp page
本文介绍了刷新jsp页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
有没有一种方法可以使用JavaScript在onLoad之后刷新页面?不会陷入困境?
我有这个,但是陷入了一个循环:
< head>
< script type ="text/javascript">
Hi
Is there a way to use javascript to refresh a page once onLoad? without getting stuck in a loop?
I have this but it gets stuck in a loop:
<head>
<script type="text/javascript">
function reload()
{
window.location.reload(true);
}
</script>
</head>
< bodyönload="reload()">
任何帮助将不胜感激.
</script>
</head>
<body önload="reload()">
Any help will be appreciated.
推荐答案
komali !!
您可以使用以下内容:
< body onLoad ="if(location.href.indexOf(``reload'')==-1)location.replace(location.href +''?reload'')">
hi komali!!
u can use following:
<body onLoad="if (location.href.indexOf(''reload'')==-1) location.replace(location.href+''?reload'')">
这篇关于刷新jsp页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文