<!DOCTYPE html>
<html>
<body>
<%
如果 Request.QueryString<>"" 则
如果 Request.QueryString("name")<>", " 则
name=Request.QueryString("name")
如果 instr(name,"/")=0 且 instr(name,"\")=0 且 instr(name,"<")=0 则
name1=Request.QueryString("name")(1)
name2=Request.QueryString("name")(2)
否则
response.write("输入非法")
response.end
结束 if
结束 if
结束 if
%>
<form action="demo_reqquery2.asp" method="get">
名字
<input type="text" name="name" value="<%=name1%>" />
<br>
姓氏
<input type="text" name="name" value="<%=name2%>" />
<br>
<input type="submit" value="提交" />
</form>
<hr>
<%
如果 Request.QueryString<>"" 则
Response.Write("<p>")
Response.Write("从表单接收到的信息为:")
Response.Write("</p><p>")
Response.Write("name=" & name)
Response.Write("</p><p>")
Response.Write("name 属性的计数为:")
Response.Write(Request.QueryString("name").Count)
Response.Write("</p><p>")
Response.Write("名字=" & name1)
Response.Write("</p><p>")
Response.Write("姓氏=" & name2)
Response.Write("</p>")
结束 if
%>
</body>
</html>