最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ASP之處理用Javascript動(dòng)態(tài)添加的表單元素?cái)?shù)據(jù)的代碼

 更新時(shí)間:2007年11月24日 12:27:52   作者:  
上一篇文章講到了動(dòng)態(tài)添加表單元素,這次我們來講講怎么樣來處理這些動(dòng)態(tài)添加的表單元素傳過來的數(shù)據(jù)! 怎么樣動(dòng)態(tài)添加表單元素,我這里就不細(xì)說了!不明白的看看上一篇文章http://www.fzitv.net/html/200711/23/12856.htm下面是動(dòng)態(tài)添加表單元素的頁面代碼!
復(fù)制代碼 代碼如下:

<html > 
<head> 
<title>動(dòng)態(tài)添加表單元素BlueShine</title> 
</head> 
<script language="javascript"> 
function AddElement(mytype){ 
var mytype,TemO=document.getElementById("add"); 
var newInput = document.createElement("input");  
newInput.type=mytype;  
newInput.name="input1";//這個(gè)是必須的,在處理頁中要用到! 
TemO.appendChild(newInput); 
var newline= document.createElement("br"); 
TemO.appendChild(newline); 

</script> 
<body> 
 <form action="getdata.asp" method="post" name="frm"> 
 <p style=" background:#FFEC8B;border:solid 1px #1E90FF;font-size:13px;line-height:200%;width:100px;text-align:center"><a style="color:#218868;" href="javascript:void(0)" onClick="AddElement('text')">添加文本框</a></p> 
 <p id="add"></p> 
   <label> 
   <input type="submit" name="Submit" value="提交"> 
   </label> 
   <label> 
   <input type="reset" name="Submit2" value="重置"> 
   </label> 
</form> 
</body> 
</html> 

下面是數(shù)據(jù)處理頁面代碼:  
復(fù)制代碼 代碼如下:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>動(dòng)態(tài)添加表單元素</title> 
</head> 
<body> 
<div style="font-size:13px"><% 
dim data,arr,n 
data=Trim(Request.Form("input1"))'這就是在代碼中定義的name屬性 
arr=split(data,",")'用Split函數(shù)對(duì)數(shù)據(jù)進(jìn)行分割! 
Response.Write("這是未分割的數(shù)據(jù):") 
 Response.Write(data) 
 Response.Write("<br>") 
 Response.Write("<br>") 
 Response.Write("這是用Split函數(shù)分割后的數(shù)據(jù):") 
 Response.Write("<br>") 
 for n= 0 to ubound(arr) 
 Response.Write(arr(n)) 
 Response.Write("<br>") 
 Next 
  %></div> 
</body> 
</html> 

相關(guān)文章

最新評(píng)論

长葛市| 建德市| 新沂市| 会理县| 加查县| 中阳县| 赣州市| 荥阳市| 铜山县| 伊宁市| 太仓市| 宝坻区| 泸州市| 沐川县| 汤阴县| 新野县| 太原市| 景宁| 六枝特区| 绥德县| 丹棱县| 卢氏县| 岳普湖县| 且末县| 巴南区| 溆浦县| 永康市| 克什克腾旗| 墨脱县| 赤壁市| 泾阳县| 玉田县| 寿光市| 日喀则市| 青岛市| 石棉县| 舒兰市| 巫溪县| 呼图壁县| 吴桥县| 双桥区|