首页 > 代码库 > js6:history和navigator对象的学习

js6:history和navigator对象的学习

原文发布时间为:2008-11-08 —— 来源于本人的百度文章 [由搬家工具导入]

<html>
<head>
<title>js</title>
</head>
<body>
<input type="button" name="goto" Value=http://www.mamicode.com/"Back" onClick="history.back()">
<input type="button" name="goto2" Value=http://www.mamicode.com/"Forward" onClick="history.forward()">
<input type="button" name="goto3" Value=http://www.mamicode.com/"go1" onClick="history.go(1)">
<input type="button" name="goto4" Value=http://www.mamicode.com/"go-1" onClick="history.go(-1)">
<script type="text/javascript">
document.write(history.length+"<br>");
for(var prop in navigator){
document.write(prop+" : "+navigator[prop]+"<br>");
}
</script>
</body>
</html>

js6:history和navigator对象的学习