只刷新一次浏览器

Posted runningding

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了只刷新一次浏览器相关的知识,希望对你有一定的参考价值。

<script>
function fresh()
{
if(location.href.indexOf("?reload=true")<0)
{
location.href+="?reload=true";
}
}
setTimeout("fresh()",300);
document.onkeydown = function()
{
if(event.keyCode==116) {
event.keyCode=0;
event.returnValue = false;
}
}
document.oncontextmenu = function() {event.returnValue = false;}
</script>

以上是关于只刷新一次浏览器的主要内容,如果未能解决你的问题,请参考以下文章