快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

如何使用ASP制作模似动态生长的表单?

FILE: DYNAFORM.ASP
<%@ language = vbscript%>
<% Response.Expires = 0 %>
<HTML>
<HEAD>
<TITLE>Dynamically Growing Form</TITLE>
</HEAD>
<BODY>
<%
If Request("Action") = "Submit the List" Then
\\' Show what was entered.
Response.Write "<B>Here are the Items submitted:</B><BR>"
nItems = Request.Form("Items").Count
For I = 1 To nItems
\\' Show submitted Items
Response.Write Request.Form("Items")(I) & "<BR>"
Next
Response.Write Request("Item") & "<BR>"

Else

\\' Create the form from all items. %>
<FORM Action=dynaform.asp Method=Post>
<B>Items:</B><BR>
<%
nItems = Request.Form("Items").Count
For I = 1 To nItems
\\' Show previously submitted Items
Response.Write "<INPUT Type=Text Name=Items Value=""" & _
Trim(Request.Form("Items")(I)) & """><BR>"
Next

If Request.Form("Item") <> "" Then
\\' paint a new input box, and store the old Item in Items collection
Response.Write "<INPUT Type=Text Name=Items Value=""" & _
Trim(Request.Form("Item")) & """><BR>"

Response.Write "<P>Please enter an Item,<BR>"
Response.Write "and submit them one at a time<BR>"
Response.Write "by pressing the Add Item button.<BR>"
Response.Write "<INPUT Type=Text Size=50 Name=Item Value="""""">"
Else
\\' No Item was submitted, don\\'t show an error
Response.Write "<P>Please enter an Item,<BR>"
Response.Write "and submit them one at a time<BR>"
Response.Write "by pressing the Add Item button.<BR>"
Response.Write "<INPUT Type=Text Size=40 Name=Item Value="""""">
<BR>"
End If

%>

<P>
<INPUT Type="Submit" Name="Action" Value="Add Item to List">
<INPUT Type="Submit" Name="Action" Value="Submit the List">
<BR>

<% End If %>

</FORM>
</BODY>
</HTML>

返回类别: 教程
上一教程: ASP环境下邮件列表功能的实现 (二)(推荐)
下一教程: 正则表达式简介(9-10)

您可以阅读与"如何使用ASP制作模似动态生长的表单?"相关的教程:
· 如何使用ASP制作模似动态生长的表单
· 如何使用ASP制作类似安装向导的页面
· 用ASP动态生成JAVASCRIPT的表单验证代码
· 如何使用ASP在自己的网站建立投票机制(二)
· ASP如何使用MYSQL数据库
    微笑服务 优质保证 索取样品