ASP取得表格输入数据的方法
:GET POST
一.get:用户端将数据加到URL后,格式为”?字段1=输入数据1&字段2=输入数据2&...",
再将其送到服务器。
如: action为www.abc.com, 字段Name输入数据为jack,字段age的数据为15,则用get方法为
http://www.abc.com?Name=jack&Age=15

二.post:用户端用http信息数据传送到服务器
ASP中:
get:使用“输入数据= Request.QueryString("字段名")",将附加于URL的数据取出。
post:使用“输入数据=Request.Forml"(字段名")",读取HTTP信息数据字段。
* Request.QueryString范例
如:〈A hery="aspform.asp?Name=jack&Age=15">
按此〈/A〉〈p〉
Name:<%=request.QueryString("Name")%)
Age:<%=request.QeueryString("Age")%)
* get 范例
·aspturm.asp:
<form action="asp1b.asp" method="get">
姓名: <input type=text name="input1" value="Your name">
<p>
特征: <select name="input2">
<option>cool!
<option>handsome
<option>warmhearted
</select>
<input type=submit value="ok">
</form>
asp1b.asp的内容
<html><body>
<% =request.querystring("input1"%> hi, your character is
<%= request.querystring("input2"%>
</body></html>
posted on 2007-05-21 18:50  简约旋律  阅读(1089)  评论(1编辑  收藏  举报