當前位置:首頁 » 密碼管理 » 靜態html頁面的訪問量統計代碼

靜態html頁面的訪問量統計代碼

發布時間: 2023-08-15 01:09:40

Ⅰ 在靜態頁中如何做訪問次數的統計呢

<SCRIPT src="static_click.asp?articleid=[id]"></SCRIPT >
[id]就是你生成文章的喚遲id,上面的這行代碼包含在你生成的文章頁面

以下是atatic_click.asp的代碼
<!-- #include file="inc/conn.asp" -->
<%

articleid=int(trim(request.querystring("articleid")))
sqlStr="update proct set hits=hits+1 where articleid=" & articleid
'給文章點擊數加1
conn.execute(sqlStr)
'讀出文章點擊數弊枝
hits=conn.execute("select hits from proct where articleid=" & articleid)(0)
%>

document.write(<%=hits%>)

更多內和卜李容查看下面網址:

Ⅱ 統計當前網頁被訪問次數的Jquery代碼:

最簡單的辦法:

<scripttype="text/javascript">

if(localStorage.pagecount){localStorage.pagecount=Number(localStorage.pagecount)+1;}else{localStorage.pagecount=1;}document.write("訪問數:"+localStorage.pagecount+"time(s).");</script>
熱點內容
存儲過程效率 發布:2025-03-04 18:28:12 瀏覽:217
源碼怎麼生成的 發布:2025-03-04 18:28:01 瀏覽:691
初中解壓舞蹈 發布:2025-03-04 18:06:13 瀏覽:778
點餐系統php 發布:2025-03-04 18:06:12 瀏覽:803
mwc演算法 發布:2025-03-04 18:05:36 瀏覽:820
汽車之家的車輛配置表怎麼復制 發布:2025-03-04 18:00:35 瀏覽:89
l的演算法 發布:2025-03-04 18:00:33 瀏覽:860
普通電腦做伺服器做緩存 發布:2025-03-04 18:00:31 瀏覽:84
洗牌解壓 發布:2025-03-04 17:56:15 瀏覽:822
熱血合擊手游電腦版伺服器 發布:2025-03-04 17:54:45 瀏覽:211