来自表单的更多信息

代码:

<!DOCTYPE html>

<html>

<body>

 

<form action="demo_form2.asp" method="post">

First name:

<input type="text" name="name" value="Donald" />

<br>

Last name:

<input type="text" name="name" value="Duck" />

<br>

<input type="submit" value="Submit" />

</form>

<hr>

 

<p>The information received from the form above was:</p>

<%

If Request.Form("name")<>"" Then

      Response.Write("<p>")

      Response.Write("name=" & Request.Form("name"))

      Response.Write("</p><p>")

      Response.Write("The name property's count is: ")

      Response.Write(Request.Form("name").Count)

      Response.Write("</p><p>")

      Response.Write("First name=" & Request.Form("name")(1))

      Response.Write("</p><p>")

      Response.Write("Last name=" & Request.Form("name")(2))

      Response.Write("</p>")

End if

%>

 

</body>

</html>

结果:


相关文章