創(chuàng)建 welcome cookie

代碼:

<%

dim numvisits

response.cookies("NumVisits").Expires=date+365

numvisits=request.cookies("NumVisits")

 

if numvisits="" then

   response.cookies("NumVisits")=1

   response.write("Welcome! This is the first time you are visiting this Web page.")

else

   response.cookies("NumVisits")=numvisits+1

   response.write("You have visited this ")

   response.write("Web page " & numvisits)

   if numvisits=1 then

     response.write " time before!"

   else

     response.write " times before!"

   end if

end if

%>

<!DOCTYPE html>

<html>

<body>

</body>

</html>

結(jié)果:

Welcome! This is the first time you are visiting this Web page.

相關(guān)文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频