14-3 ?送表????

Request.Form M Request.QueryString OΨӦsΤݦbJTCY檺ǿ覡O postAhڭ̥ib ASP {XHUC覡ŪX檺JȡG J = Request.Form("W") Y檺ǿ覡O getAhڭ̥iΤUC覡ŪXJȡG J = Request.QueryString("W") ƹWAL׬O post getAunW٤ơAڭ̳iHΤUC²g覡ŪX檺JȡG J = Request("W") oO] Request("W") bw Collection ɡA|եŪ Request.QueryString("W")AY\AhFYѡAh|AŪ Request.Form("W")C

UCdһpg Request.Form Request.QueryString oơAAiHΤPǿ覡]get άO post^A˵ ASP {XŪJȡAdҦpU:

Example]request/formData.asp^G

WzdҪlɦpUG

lɡ]request/formData.asp^G]ǦϰUYi^
<%@language=JScript%>
<%title="g Request.Form  Request.QueryString ǰeƪd"%>
<!--#include file="../head.inc"-->
<hr>

<form action="formData.asp?xxx=yyy&aaa=bbb" name="myform">
<ul>
<li>zjWG<input name="your_name" value="Gs">
<li>̫ӪkP ()G
	<input type="radio" name="singer" value="dL" checked>dL
	<input type="radio" name="singer" value="Lӿo">Lӿo
	<input type="radio" name="singer" value="~W">~W
	<input type="radio" name="singer" value="Ӧ">Ӧ
<li>i (ƿ)G
	<input type="checkbox" name="course" value="Ƶc">Ƶc
	<input type="checkbox" name="course" value="ƾ" checked>ƾ
	<input type="checkbox" name="course" value="u{ƾ">u{ƾ
	<input type="checkbox" name="course" value="ƭȤk" checked>ƭȤk
<li>̳wB ()G
	<select name="single_choice"> 
	<option value="y" selected>y
	<option value="y">y
	<option value="]y">]y
	<option value="Yoyoy">Yoyoy
	</select>
<li>hLa (ƿ)G
	<select name="multiple_choice" size=3 multiple>
	<option value="San Francisco" selected>San Francisco
	<option value="Los Angeles">Los Angeles
	<option value="Boston" selected>Boston
	<option value="Seoul">Seoul
	<option value="Tokyo">Tokyo
	</select>
<li>٦ܭnG<br>
<textarea name="comments" cols=60 rows=3>
oӰݨܦ...
uN|Aਥ...
</textarea>
</ul>
<center>
<input type="button" value="g get eX" onClick="this.form.method='get'; this.form.submit()">
<input type="button" value="g post eX" onClick="this.form.method='post'; this.form.submit()"><br>
]ݫeXA~iHݨUƳI^
</center>
</form>

<h3 align=center> ASP Ū쪺</h3>
<!--#include file="../listdict.inc"-->
<p><% listdict(Request.QueryString, "Request.QueryString"); %>
<p><% listdict(Request.Form, "Request.Form"); %>

<hr>
<!--#include file="../foot.inc"-->

bWzdҤAڭ̥iH[UCƶG

Hint
pGAPɥΨ get M post ضǰekAN̦nn Request("W") ²g覡AHKy~C

pGAW٦b椤ҭơAiΤUCkŪXG

Request.QueryString(name)(index) Request.Form(name)(index)

Hint
ЯSO`NAo̪ޭȬOq 1 }lAӤO 0C

YAĥ index ӫwҭnŪȮɡAh ASP |ŪhӭȩҧΦrA䤤C@ӭȳHrI}CҦpAUCO

example/request/parseQueryString.asp?xyz=777&xyz=888&xyz=999&abc=111&abc=222&pqr=333
GG

Example]request/parseQueryString.asp?xyz=777&xyz=888&xyz=999&abc=111&abc=222&pqr=333^G

WzdҪlɦpUG

lɡ]request/parseQueryString.asp^G]ǦϰUYi^
<%@language=JScript%>
<%title="pѪR Request.QueryString ƪ"%>
<!--#include file="../head.inc"-->
<hr>

<table border=1 align=center>
<tr>
<th bgcolor=999999>Name<th bgcolor=999999>X{<th bgcolor=999999>ѪRG</tr> 
<%
var Enum=new Enumerator(Request.QueryString);
for (Enum.moveFirst(); !Enum.atEnd(); Enum.moveNext()){
	Response.Write("<tr>");
	Response.Write("<td>"+Enum.item());
	Response.Write("<td>"+Request.QueryString(Enum.item()).count);
	Response.Write("<td>Request.QueryString("+Enum.item()+")="+Request.QueryString(Enum.item())+"<br>");
	for (i=1; i<=Request.QueryString(Enum.item()).count; i++)
		Response.Write("Request.QueryString("+Enum.item()+")("+i+")="+Request.QueryString(Enum.item())(i)+"<br>");
}
%>   
</table>

<hr>
<!--#include file="../foot.inc"-->


JScript {]pPΡGΩAݪ ASP