首页 / 知识

关于Window history.forward()实例

2023-04-11 13:08:00

关于Window history.forward()实例
Window history.forward()
history forward() 方法加载历史列表中的下一个 URL。
 
这与在浏览器中点击前进按钮是相同的:
 
实例
在页面上创建一个向前的按钮:
 
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
function goForward()
{
    window.history.forward()
}
</script>
</head>
<body>
 
<input type="button" value="Forward" onclick="goForward()">
 
</body>
</html>

浏览加载方法实例按钮这与

最新内容

相关内容

热门文章

推荐文章

标签云

猜你喜欢