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

所谓旧城旧梦

所谓旧城旧梦

2016-01-29 18:10

如何使用ASP制作模似动态生长的表单?,如何使用ASP制作模似动态生长的表单?
  FILE: DYNAFORM.ASP
<%@ language = vbscript%
<% Response.Expires = 0 %
<HTML
<HEAD
<TITLEDynamically Growing Form</TITLE
</HEAD
<BODY
<%
If Request("Action") = "Submit the List" Then
' Show what was entered.
Response.Write "<BHere 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
<BItems:</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 "<PPlease 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 "<PPlease 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
 
展开更多 50%)
分享

猜你喜欢

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

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

动态网页制作必须技术:ASP和HTML表单

Web开发
动态网页制作必须技术:ASP和HTML表单

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

ASP动态生成的javascript表单验证代码

Web开发
ASP动态生成的javascript表单验证代码

ASP动态生成的javascript表单验证代码

ASP
ASP动态生成的javascript表单验证代码

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

如何使用asp+ 动态创建页面元素

电脑网络
如何使用asp+ 动态创建页面元素

用ASP动态生成javascript的表单验证代码

ASP
用ASP动态生成javascript的表单验证代码

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

Photoshop教程:为运动鞋添加不规则投影的技巧

Photoshop教程:为运动鞋添加不规则投影的技巧

Word学习之八:文件操作技巧

Word学习之八:文件操作技巧
下拉加载更多内容 ↓