首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

ASP实例教程:Form集合

整理日期:2008年08月13日 【字体:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2008-08/1218592112.html
  <%
  dim fname
  fname=Request.Form("fname")
  If fname<>"" Then
   Response.Write("您好!" & fname & "!<br />")
   Response.Write("今天过得怎么样?")
  End If
  %>
  </body>
  </html>

  来自表单的更多信息

  本例演示假如若干的输入域使用了相同的名称,Form集合会包含什么信息。它将展示如何把这些相同的名称分割开来。它也会展示如何使用count关键词来对"name"属性进行计数。此表单使用POST方法。

  本示例代码如下:

  <html>
  <body>
  <form action="/example/aspe/demo_aspe_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>来自上面的表单的信息:</p>
  <%
  If Request.Form("name")<>"" Then
   Response.Write("<p>")
   Response.Write("name=" & Request.Form("name"))
   Response.Write("</p><p>")
   Response.Write("name 属性的数目:")
   Response.Write(Request.Form("name").Count)
   Response.Write("</p><p>")
   Response.Write("First name=" & Request.Form("name")(1))
Tags:ASP   实例教程   Form集合
ASP实例教程:Form集合
'http://www.etoow.com/html/2008-08/1218592112.html
1
 
2
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved