1、history
<!DOCTYPE html>
<html>
<head>
<title>history</title>
</head>
<body>
<!--history类的go和black函数有跳转的意思
go(前进的页数)
-->
<input type="button" value="前进" onclick="window.history.go(1)"/><!--前进前一个页面-->
<input type="button" value="后退" onclick="window.history.go(-1)"/><!--前进后一个页面即后退-->
<input type="button" value="后退" onclick="window.history.black()"/><!--与上面的功能一样-->
<input type="button" value="打开新页面" onclick="window.open('新页面2.html', '_self')"/>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>新页面2</title>
</head>
<body>
<input type="button" value="后退" onclick="window.history.go(-1)"/>
</body>
</html>
2、open和close
<!DOCTYPE html>
<html>
<head>
<title>open和close</title>
</head>
<body>
<input type="button" value="打开新页面" onclick="window.open('新页面.html')"/>
<input type="button" value="开启百度(当前窗口)" onclick="window.open('http://www.baidu.com', '_self');" />
<input type="button" value="开启百度(新窗口)" onclick="window.open('http://www.baidu.com', '_blank');" />
<input type="button" value="开启百度(父窗口)" onclick="window.open('http://www.baidu.com', '_parent');" />
<input type="button" value="开启百度(顶级窗口)" onclick="window.open('http://www.baidu.com', '_top');" />
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>新页面</title>
</head>
<body>
<input type="button" value="关闭" onclick="window.close()"/>
</body>
</html>