`

js刷新页面方法

Go 
阅读更多

<html xmlns="http://www.w3.org/1999/xthml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>刷新文档</title>
</head>
<body>
<input type=button value=刷新 onclick="history.go(0)">
<!-- go方法刷新页面-->
<input type=button value=刷新 onclick="location.reload()">
<!-- reload方法刷新页面-->
<input type=button value=刷新 onclick="location=location">
<!-- load方法刷新页面-->
<input type=button value=刷新 onclick="window.navigate(location)">
<!-- navigate方法刷新页面-->
<input type=button value=刷新 onclick="location.replace(location)">
<!-- replace方法刷新页面-->
</body>
</html>

地址对象方法的应用:刷新文档。
程序运行后,当单击各个刷新按钮时,都能实现刷新功能。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics