xiaowen613

1、实现页面自动刷新

把如下代码放倒<head>区域中

<meta http-equiv="refresh" content="3" />,则页面会3秒自动刷新一次。

2、页面自动跳转

<meta http-equiv="refresh" content="3;url=http://www.baidu.com" />,则页面3秒自带跳到百度页面,如果是当前页面即为自动刷新了。

3、setTimeout实现

<body onload="setTimeout(\'history.go(0)\',3000)">//则3秒后页面自动调回到上已页面

<body onload="setTimeout(\'this.location.reload();\',3000)">//则3秒后页面自动调回到上已页面

4、按钮刷新的N中方法

<input id="Button1" type="button" value="刷新" onclick="history.go(0)" />

<input id="Button1" type="button" value="刷新" onclick="location.reload()" />

<input id="Button1" type="button" value="刷新" onclick="location=location" />

<input id="Button1" type="button" value="刷新" onclick="location.assign(location)" />

<input id="Button1" type="button" value="刷新" onclick="document.execCommand(\'Refresh\')" />

<input id="Button1" type="button" value="刷新" onclick="window.navigate(location)" />

<input id="Button1" type="button" value="刷新" onclick="location.replace(location)" />

<input id="Button1" type="button" value="刷新" onclick="window.open(\'http://www.baidu.com\',\'_self\')" />

<input id="Button1" type="button" value="刷新" onclick="document.all.WebBrowser.ExecWB(22,1)" />

分类:

技术点:

相关文章:

  • 2021-12-31
  • 2022-12-23
  • 2021-11-30
  • 2021-08-13
  • 2021-12-05
  • 2021-12-15
  • 2021-12-05
  • 2021-05-08
猜你喜欢
  • 2021-12-15
  • 2021-11-12
  • 2021-11-04
  • 2021-06-03
  • 2021-12-13
相关资源
相似解决方案