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

當前位置: 首頁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 (您的評論需要經過審核才能顯示)
主站蜘蛛池模板: 半夜电影| 姐妹电影| 幻乐森林演员表| 藏地奇兵| 最可爱的人 电影| 调音师结局剧情大解析| 女孩们在线观看| a friend in need中文翻译| 纵横四海国语免费观看| 2025女人最旺微信头像| 《遇见你之后》电影在线观看| 陈若仪个人简历资料| 卡五星怎么算账| 午夜魅影直播| 国家干部电视剧| 索玛花开 电视剧| 员工离职协议书| 金敏喜个人简历| 皇冠小刀清痘视频| 战无双| 被主人调教| 格伦鲍威尔| 狂野殴美激情性bbbbbb| 泥视频| 麻豆视频免费在线观看| 又大又肥又圆的白屁股| 缉私群英 电视剧| 藏文作文| trainspotting| 强电影| 砌体工程质量验收规范gb50203---2011 | 林熙蕾三级| 281封信电视剧演员表| 哈基米| 黑龙江省地图高清全图| 胭脂 电视剧| 四 电影| 赤胆情| 康熙微服私访记1| 林丹出轨视频| 我在稻草狗截取了一小片段原声|