ASPÒ³ÃæÈçºÎ´«Öµ? - Web ¿ª·¢ / ASP
ĿǰÊÇA.aspÃæÒ³ÓÐÒ»¸ö±äÁ¿aa,Ôõô²Å¿ÉÒÔ´«µ½B.aspÒ³Ãæ,²»ÊÇÓÃURL´«,ÏëÓÃ<inupt >¿Ø¼þÔõô´«°¡!Çë´ó¼ÒÖ¸µã!
ÓÃ±íµ¥´«Öµ
´«Öµ£¬GETºÍPOST£¬ÒªÃ´´ø²ÎÊý£¬ÒªÃ´ÓÃform
¶øÇÒ£¬Èç¹ûÄãÁ½¸öÒ³ÃæÃ»ÓÐÈκιØÁª£¬´«ÖµºÎÓÃÄØ£¿
Èç¹ûÓйØÁª£¬ÒÔ¹ØÁªÐÎʽ´«Öµ¼´¿É£¡
Èç¹ûûÓйØÁª£¬ÒÔÏàͬ·½Ê½»ñµÃÖµ¼´¿É£¡
a.aspÒ³Ãæ
<form action="b.asp" method="post">
<input type="hidden" id="str" name="str" value="<%=aa%>" />
<input type="submit" />
</form>
b.aspÒ³Ãæ
<%
bianliang=trim(request.form("str"))
%>
ÄãÇ°ÃæÄÇÌù×Ô¼ºËµÒªÓÃurl´«µÄô¡£¡£·´Õý´«²ÎÊý¾ÍÕâÁ½ÖÖ¡£¡£
ллÄãÃǵĻشð,Á½ÖÖÐÎʽÎÒ¶¼ÏëÖªµÀ.
<input type="submit" />Õâ¸öÊdzÌÐòĬÈÏÌá½»µÄ£¿
Êǵġ£Ã»Õâ¸ö°´Å¥ÄãÔõôÈÃËû´ÓaÒ³ÃæÌøµ½bÒ³Ãæ¡£
ÊDz»ÓÃÊÖ¶¯µãµÄ°É
²»¶à˵£¬Ä÷Ö
session
url
form
cookie
µ±È»Òªµã<input type="submit"/>Ìá½»£¬ÒªÔÚ±íµ¥ÖÐ
Ìá½»·½Ê½ <form method="get" action="b.asp">»òÕßmethod="post"¶¼ÐÐ
Ïà¹ØÎÊ´ð£º
ÍòÍøµÄ·þÎñÆ÷Ö§³Öα¾²Ì¬µÄ,Ö±½ÓÓÃrewriteÔÚweb.configÎļþд¹æÔò,Ò²²»Óð²×°×é¼þ¾Í¿ÉÒÔʵÏÖα¾²Ì¬,µ«ÊÇÔÚʱ´ú»¥Áª·þÎñÆ÷¾ÍÓò»ÁËÁË,×ÉѯËüµÄ¿Í·þ,Ëû˵ËûÃÇ·þÎñÆ÷(»ù±¾ÐÍC)²»Ö§³Öα¾²Ì¬µÄ.ÇëÎÊһϸ÷λÎÒ¸ÃÓÃʲô·½·¨ ......
ÈçºÎÓÃjs»ñµÃ asp дÈëµÄsession
session("user_id") = "cqsj1987"
ÔõôÑùÓÃjs Õâ¸ösession Öµ?
JScript code:
var uid="<%=session("user_id")%>"
<%
s ......
1.asp.net×öµÄÒ»¸ö´ðÌâÒ³Ãæ£¬ÈçºÎʵʱÏÞʱºó×Ô¶¯Ìá½»£¬Çë´ó¼Ò¸øµã˼·
ÏÞʱµÄʱ¼äÐÅÏ¢´æ·ÅÔÚÊý¾Ý¿âÖÐ
2.Èç¹û´ðÌâʱ¼äÉèÖõĽϳ¤£¬ÈçºÎ·½Ê½session³¬Ê±ºóÒ³ÃæÎÞЧ
лл
ÓÃjs·½·¨À´¿ØÖÆ
»Ø¸´ÄÚÈÝÌ«¶ÌÁË¡£¡£
js ......
ÊÇÕâÑù×ӵģ¬ÎÒÏÖÔÚ×öÁËÒ»¸öÍøÖ·µ¼º½µÄÍøÕ¾£¬Ê×ҳȫÊÇÍøÃûºÍÁ´½Ó£¬ÀàËÆhao123µÄÊ×Ò³£¬µ«ÊÇÓлáÔ±µÇ¼£¬»áÔ±µÇ¼ºó¿ÉÒÔÊ×´ÎÍøÕ¾£¬»áÔ±µÇ¼ºó»áÏÔʾÊղصÄÍøÕ¾³öÀ´£¬ÒòΪÊ×ҳͷ²¿Ï»áÓÐÒ»¸öÎÒµÄÊղصÄÀ¸Ä¿...ÏÖÔÚÿ´ò¿ ......