首页 > 互联资讯 > 技术交流  > 

如何动态添加Form项?

<%@ language = vbscript%>
<% Response.Expires = 0 %>


</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 9.0pt; mso-ascii-font-family: ' '; mso-hansi-font-family: ' '">星河影动之动态添加</SPAN><SPAN lang=EN-US style="FONT-FAMILY: ' '; mso-bidi-font-size: 9.0pt">Form</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 9.0pt; mso-ascii-font-family: ' '; mso-hansi-font-family: ' '">项</SPAN><SPAN lang=EN-US style="FONT-FAMILY: ' '; mso-bidi-font-size: 9.0pt">


<%
If Request("Action") = "
提交列表" Then
Response.Write "
提交的项:
"

' 显示输入的内容.
nItems = Request.Form("Items").Count
For i = 1 To nItems
Response.Write Request.Form("Items")(i) & "
"

' 显示提交的项.
Next
Response.Write Request("Item") & "
"
Else
'
为所有的项创建Form.

%>


:

<%
nItems = Request.Form("Items").Count
For i = 1 To nItems
Response.Write "Trim(Request.Form("Items")(i)) & """>
"

' 显示前面已提交的项.
Next

If Request.Form("Item") <> "" Then
Response.Write "Trim(Request.Form("Item")) & """>
"

' 保存已输入的项,再生成一个新的输入框.

Response.Write "

请输入项,并点击"添加项到列表"按钮提交
"
Response.Write ""
Else
Response.Write "

请输入项,并点击"添加项到列表"按钮提交Please enter an Item,
"
Response.Write "
"

' 如果没有项提交,就不显示错误信息.

End If
%>


添加项到列表Add Item to List">
提交列表
Submit the List">


<% End If %>


[1]

如何动态添加Form项?由讯客互联技术交流栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“如何动态添加Form项?