Categories: Browser对象tips

History forward() 方法 | History 对象

返回到:Browser 对象:History 对象

定义和用法

forward() 方法可加载历史列表中的下一个 URL。

调用该方法的效果等价于点击前进按钮或调用 history.go(1)。

语法

history.forward()

所有主要浏览器都支持 forward() 方法

实例

页面上创建一个前进按钮:

<!DOCTYPE html>
<html>
 <title>Web176教程(Web176.com)</title>
<head>
<script>
function goForward(){
 window.history.forward()
}
</script>
</head>
<body>

<input type="button" value="前进" >
terry

这个人很懒,什么都没有留下~

Share
Published by
terry

Recent Posts