<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<a href="https://blog.csdn.net/jialan75/article/details/122853143">百度</a>
<button onclick=a()>返回上一页</button>
<button onclick=b()>前进</button>
<button onclick=c()>刷新当前页面</button>
</body>
</html>
<script>
var his = window.history;
console.log(his);
function a(){
window.history.back();
}
function b(){
window.history.forward();
}
function c(){
window.location.reload();
}
</script>
css html js 返回上一页 前进一页 刷新页面
最新推荐文章于 2023-05-12 09:08:34 发布