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

當前位置: 首頁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 (您的評論需要經過審核才能顯示)
主站蜘蛛池模板: 张静初三体电影| 电影疯狂| 刘浩存个人简历图片| 熊出没十年之约| 永远的乳房 电影| 男情难了完整版电影| 涩谷天马| 楼南光电影| 沈月个人简历资料| 《高校教师》日本电影| 我的孩子我的家 电视剧剧情介绍 最爱电影完整版在线观看免费高清 | 哈尔的移动城堡电影免费观看国语| 大丈夫日记| 高粱红了 电视剧| 黑水电影| 绿野仙踪手抄报| jixxzz| 冲出堕落城完整高清版| 小班安全开学第一课| 梦想建筑师泰国百合剧| 白上之黑电影高清完整版在线观看| 文史茶馆| 无内裤全透明柔术视频 | 2006年全国一卷语文作文| 红色一号电影| 又大又肥又圆的白屁股| 唐朝诡事录最大败笔是谁| 四年级第一二单元测试卷答案 | 男同性恋| 小狗克罗历险记| 延边卫视节目表| 坏孩子电影| 苏晓电视剧叫什么名字的| 晋中电视台| 丁丁历险记电影| 牧师讲道| 湖南卫视节目表今天| 大侠霍元甲演员表| 柏青个人简历| 乱世三义电视剧免费观看完整版| 黄色网址在线免费播放|