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

當(dāng)前位置:首頁文章首頁 IT學(xué)院 IT技術(shù)

關(guān)于使用Cookie來跟蹤用戶的實例

作者:  來源:  發(fā)布時間:2011-5-31 9:40:06  點(diǎn)擊:

學(xué)習(xí)ASP程序設(shè)計的朋友可以進(jìn)來看看,這是關(guān)于使用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-

文章評論

軟件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
主站蜘蛛池模板: 我的一级兄弟 电影| 爱之梦钢琴谱| 真相演员表| 自拍激情视频| 沈月个人简历资料| 花宵| 汪汪队100集全免费| 身披彩衣的姑娘简谱| 牵着妈妈的手广场舞| 十大臭虫图片| 黄造时曹查理隔世情电影| 白蛇三| 小虎队《爱》歌词| 黄色网址视频| 陈文娟| 金时厚| china中国农村妇女aⅴ| 在线观看高清电影| 小姐诱心国语未删减版| 头文字d里演员表| 祝福语生日| 古天乐电影全部作品免费观看| 黄连厚朴电影| 北京卫视今日播出节目表| 拾贝的小女孩阅读理解答案| 吉泽明步作品| 大追捕电影结局| 请赐我一双翅膀在线观看| 美国派7| 韩国电影《爱欲》| 江苏卫视今天节目表| 阿内尔卡| 南京铁道职业技术学校单招| 鬼迷心窍1994| 丁丁历险记电影| 六年级下册语文第15课课堂笔记| 美丽的错误| doors2怪物图鉴| 七度空间卫生巾图片| 山楂树下演员表| 出轨幻想|