分享

如何在ASP中恰当地运用Cookies?

 aaie_ 2012-09-11

' 用户提交个人信息

<

response.cookies("information")("姓名")=request.form("name")

response.cookies("information")("顾客号")=request.form("id")

response.cookies("information")("来自")=request.form("from")

……

' 定义一个名为informationCookies字典,你可以定义更多,如果你需要

>

 

<html>

<head>

<title>25175</title>

</head>

<body>

<div align="center"><center>

<table border="0" cellspacing="0" width="600" height="86">

  <tr>

    <td height="65"><p align="center"><font>25175Cookies应用</font></td>

  </tr>

  <tr>

    <td align="center" height="62"><form method="post" action="remberme.asp">

<p><font>   

姓名:  <input type="text" name="name" size="20">   <br>

      顾客号: <input type="text" name="id" size="20">   <br>

来自: <input type="text" name="nation" size="20">   

</font><br>

<input type="submit" value="我想查询">  

<input type="reset" value="重写">

   </p>

    </form>

    </td>

  </tr>

</table>

</center></div>

</body>

</html>

 

welcome.asp

' 显示Cookies中的内容

<html>

<head>

<title>Cookies Demo</title>

</head>

<body>

姓名

<=request.cookies("information")("name")>

<p>

顾客号

<=request.cookies("information")("id")>

<p>

来自

<=request.cookies("information")("from")>

</body>

</html> 



    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多