每日总结 5.5

今天学习了HTML页面的刷新。

<a href="javascript:location.reload();">点击重新载入页面</a>

<a href="javascript:history.go(0);">点击重新载入页面</a>

<a href="javascript:location=location;">点击重新载入页面</a>

<a href="javascript:location=location.href;">点击重新载入页面</a>

<a href="javascript:location.replace(location);">点击重新载入页面</a>

<a href="javascript:location.replace(location.href);">点击重新载入页面</a>

<a href="javascript:location.assign(location);">点击重新载入页面</a>

<a href="javascript:location.assign(location.href);">点击重新载入页面</a>

 

 

<a href="javascript:document.URL=location.href;">点击重新载入页面</a>

<a href="javascript:navigate(location);">点击重新载入页面</a>

<a href="javascript:document.execCommand('Refresh');">点击重新载入页面</a>

<script>

function reloadPage(){

window.location.reload();

}

</script>

<input type="button" value="重新加载页面" οnclick="reloadPage()" />

 

 

<a href="">点击重新载入页面</a>

<a href="页面本身">点击重新载入页面</a>

三、实现html页面自动刷新

1. 页面自动刷新:

<meta http-equiv="refresh" content="10">

注:content="10"其中的数字表示刷新间隔的秒数

2.跳转到指定页面:

<meta http-equiv="refresh" content="10;url=你的网站地址">

3.页面自动刷新js版:

<script language="JavaScript">script">

setTimeout(function(){location.reload()},1000); //指定1秒刷新一次

</script>

posted @   一个小虎牙  阅读(10)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示