HTML 访问计数代码!!

2022-06-18 0 286
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><script>
if (localStorage.pagecount) {
    localStorage.pagecount = Number(localStorage.pagecount) + 1;
} else {
    localStorage.pagecount = 1;
}
document.write("Visits:  " + localStorage.pagecount + "  time(s).");
</script>
html5计数-jq22.com</title>
<script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<style>
</style>
</head>
<body>
<p>刷新页面会看到计数器在增长。</p>  
  
<script>
if (localStorage.pagecount) {
    localStorage.pagecount = Number(localStorage.pagecount) + 1;
} else {
    localStorage.pagecount = 1;
}
document.write("Visits:  " + localStorage.pagecount + "  time(s).");
</script>
</body>
</html>
收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

黑龙江省声美网络科技有限公司 技术经验 HTML 访问计数代码!! http://www.fuwenhao.com/168.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务