日韩精品中文字幕一区二区-日韩精品中文字幕一区-日韩精品中文字幕视频-日韩精品在线一区二区三区-第一页在线-第一福利视频

當前位置: 首頁IT技術 → 關于使用Cookie來跟蹤用戶的實例

關于使用Cookie來跟蹤用戶的實例

更多

學習ASP程序設計的朋友可以進來看看,這是關于使用Cookie來跟蹤用戶的實例,希望對大家有所幫助。

Source Code:
  
  
  
  <%
  
  '*** Keeping track of how many times
  '*** a user visits a web page, by
  '*** reading and writing cookies.
  
  '*** In this example "asphole" will be
  '*** the name of our cookie, and
  '*** "totalvisit" will be the 'key'
  '*** value we keep track of. You can
  '*** have multiple 'keys' for each
  '*** cookie.
  
  '*** Declare your variables
  Dim NumVisit
  
  '*** Check to see how many times they
  '*** have been to your web page.
  NumVisit = Request.Cookies("asphole")("totalvisit")
  
  '*** If this is their first visit to
  '*** the page NumVisit is blank, so
  '*** make the value of NumVisit 0.
  If NumVisit = "" Then
  NumVisit = 0
  End If
  
  '*** Display how many times they have
  '*** visited your web page.
  Response.Write "Visits to this page: " & NumVisit
  
  '*** Count the visit to the web page
  NumVisit = NumVisit + 1
  
  '*** Write the new total back to
  '*** the cookie in their browser
  Response.Cookies("asphole")("totalvisit") = NumVisit
  
  '*** Specify when the cookie expires.
  '*** If you don't, the cookie will
  '*** expire when the user closes their
  '*** browser, and you'll lose all info.
  Response.Cookies("asphole").Expires = "January 1, 2020"
  
  %> 
  -END-

熱門評論
最新評論
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字數: 0/500 (您的評論需要經過審核才能顯示)
主站蜘蛛池模板: 素珍| 初中生物会考真题试卷| 杨门女将一级裸片免费观看| 牙齿扩弓的最佳年龄| 曲丹个人资料简介| 应晓薇个人资料| 一级特黄新婚之夜| 日老女人逼视频| 牙疼图片 难受 表情包| 罪孽天使| 男生变女生tg动画变身| soldier's heart| 伦理 在线| 庞勇| 重活一世电视剧免费观看| 接吻摸胸视频| 电车之狼| 黄金地带电视剧免费观看| 聊斋艳谭之荷花三娘子| 生物选择性必修三| 情欲禁地| 梁美京| 绿巨人3| 意大利诱惑| 杰奎琳肯尼迪| 死神来了6绝命终结站| 事业编面试题库及答案| 456电影在线| 1905电影网| 宋允雅| 哥也要| 哥哥女人| 新世纪大学英语综合教程3| 吉泽明步作品| 王安宇电影| 《电业安全工作规程》电力线路| 电影英雄| 英雄重生| 影子是我的好朋友仿句怎么写| 邓为个人简历| 欲望都市第三季|