當前位置:首頁 » 密碼管理 » 靜態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>
熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:593
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:888
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:582
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:765
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:684
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:1013
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:255
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:114
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:806
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:713