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

2016-01-29 18:10 5 1 收藏

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

【 tulaoshi.com - 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
 

来源:https://www.tulaoshi.com/n/20160129/1504633.html

延伸阅读
标签: ASP
从某个页面表单中取出信息是ASP编程中常见的问题。但是,遍历通过表单传递的记录会花去多长时间呢?这取决于数据库的大小。简单的GUI界面都可能令循环遍历操作耗费太多的时间。 比方说,假设有个团队成员登录到GUI屏幕输入自己的名字姓氏和名字之间用点号连接:amy.cowen。这个值通过表单提交,她的当前项目列表就从数据库中取了出来并显示在...
标签: ASP
  1.动态表单的界面,从csdn论坛上参考 <html <head <title无标题文档</title <meta http-equiv="Content-Type" content="text/html; charset=gb2312" <script language="javascript" var curRow=null; var y=1; function selectRow(){ var e=window.event; var tr1=e.srcElement; if(curRow) curRow.bgColor="#FFFF...
标签: Web开发
 经常有这样的要求,根据不同的需求要求include不同的文件如各个人的不同设置,所以要求能动态include文件受! #include file="filename.asp" -- 宏限制     必须存在该文件并且会预先编译(不管前面是否加以条件)     经常有这样的要求,根据不同的需求要求include不同的文件     如各个...
标签: ASP
如何使用ASP制作类似安装向导的页面? 面临的主要问题何在: 1。界面和一个Windows Wizard完全一样,有Next和Back按钮 2。用户可以使用Back按钮回到以前的任何一步,并且能够改变以前任何一步中已经选择的内容 3。form必须记住所有填入的内容 4。不能够使用数据库 5。不能够使用Sessions,防止如果Sessiosn失效后用户的所有输入丢失,不幸的是,...
标签: Web开发
想必大家在页面都使用过表单,如果你对单调的表单控制单元不满意,不妨看看以下几条技巧: 1、表单文本输入的移动选择:在文本输入栏中,如果加入了提示,来访者往往要用鼠标选取后删除,再输入有用的信息。其实只要加入onMouseOver="this.focus()" onFocus="this.select()" 代码到 textarea 中,一切就会变得简单多了,如: textare...

经验教程

664

收藏

72
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部