//有错误的地方请大佬可以评论指导一下
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript">
//window对象代表一个html文档.
//history代表当前页面的访问历史;获得:history对象是window对象的属性
//var history=window.history;
//属性
//length-->当前标签页一共浏览过几个页面
//方法
//forward==》前进
//back==》后退
//go==》前进或者后退 含有参数填写0表示当前界面 填写-1表示返回界面 填写1表示前进界面
function fun1(){
window.history.forward();
}
</script>
</head>
<body>
<a href="01-hisitory对象2.html">01-hisitory对象2.html</a>
<input type="button" value="前进" οnclick="fun1();"/>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript">
//window对象代表一个html文档.
//history代表当前页面的访问历史;获得:history对象是window对象的属性
var history=window.history;
//属性
//length-->当前标签页一共浏览过几个页面
//方法
//forward==》前进
//back==》后退
//go==》前进或者后退
function fun1(){
alert(window.history.length);
window.history.back();
}
</script>
</head>
<body><input type="button" value="后退" οnclick="fun1();"/>
</body>
</html>