历史记录跳转
作者:互联网
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>历史记录跳转</title>
</head>
<body>
<input type="button" value="前进" onclick="goForward()">
<input type="button" value="新网页" onclick="newPage()">
<script>
function newPage() { // 打开一个新的文档
window.location.assign('show.html');
}
function goForward() { // 前进
history.go(1);
}
</script><br />
-----------后退-------------<br />
<input type="button" value="后退" onclick="goBack()">
<script>
function goBack() {
history.go(-1);
}
</script>
</body>
</html>
标签:function,历史记录,newPage,跳转,go,history 来源: https://www.cnblogs.com/jiaqi818/p/12771654.html