日期:2014-05-17  浏览次数:21377 次

谁帮我写两个网页,很简单的~~~
本人不懂asp,但又要用asp来做测试
所以到这里请教各位兄弟了~~

第一个页面:一个输入框,一个提交按钮
按提交之后把输入框的内容写入cookies

第二个页面:一个按钮,检查cookies是否存在第一个页面输入框的内容,存在显示出来,不存在,显示不存在

just   this~~




------解决方案--------------------
很简单自己写啊
------解决方案--------------------
设置:
<%
if request.Form( "setcookie ") <> " " then
response.Cookies( "mycookie ")=request.Form( "setcookie ")
response.write "cookie设置ok "
else%>
<form id= "form1 " name= "form1 " method= "post " action= " ">
<input name= "setcookie " type= "text " id= "setcookie " />
<input type= "submit " name= "Submit " value= "提交 " />
</form>
<% end if%>

察看:
<%
if request.Form( "Submit ") <> " " then
if request.Cookies( "mycookie ")= " " then
response.write "不存在 "
else
response.write request.Cookies( "mycookie ")
end if
else%>

<form id= "form1 " name= "form1 " method= "post " action= " ">
<input type= "submit " name= "Submit " value= "察看 " />
</form>
<% end if%>

cookies的名称是mycookie
其实用js做就好了

------解决方案--------------------
这么简单自己网上找找资料好好学习