js点击历史记录
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>history对象</title>
</head>
<input type="button" id="btn" value="获取历史记录">
<body>
<script>
var btn=document.getElementById("btn");
btn.onclick=function () {
var length= history.length;
alert(length);
}
</script>
</body>
</html>