当前位置:首页 > Web开发 > 正文

js点击历史记录

2024-03-31 Web开发

标签:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>history对象</title>
</head>
<input type="button" value="获取历史记录">
<body>


<script>
var btn=document.getElementById("btn");
btn.onclick=function () {
var length= history.length;
alert(length);
}
</script>
</body>
</html>

技术图片

      

js点击历史记录

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/42167.html