<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
//访问页面的次数
if(localStorage.pagecount)
{
localStorage.pagecount = Number(localStorage.pagecount) + 1;
}
else
{
localStorage.pagecount = 1;
}
document.write(localStorage.pagecount);
</script>
</body>
</html>
网友评论