直接上代码,代码中有注释
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <% myDate = + 365); mon = Array("January","February","March","April","May","June","July","August","September","October","November","December" exps = mon[myDate.getMonth()] + " " + myDate.getDate() + "," +"numvisits").Expires == Request.Cookies("numvisits"(! Response.Cookies("numvisits") = 1"<h1>欢迎,这是您第一次访问该页面</h1>"++"<h1>这是您第 " + numVisits + " 次访问</h1>""numvisits") =%>
JavaScript 脚本编写 Cookies 的 Expires 属性时尽量设置为日期字符格式:
January 9,2017