<html>
<head>
<script language="Javascript">
<!--
var id=2
function CreateText(){
var div=document.getElementById("FileUpload");
var textType=document.createElement("input");
textType.setAttribute("type","file");
textType.setAttribute("name",id);
id++
div.appendChild(textType);
var br=document.createElement("br");
div.appendChild(br);
}
function DelText(){
var div=document.getElementById("FileUpload");
var maxfile=div.childNodes;
if(maxfile.length>1){
div.removeChild(div.lastChild);
id--
}
}
//-->
</script>
</head>
<body>
<form id="File" name="FileUp" enctype="multipart/form-data" method="post" action="Test.asp">
<div id="FileUpload">
<label>
<input type="file" name="1" />
<input type="button" value="+" onClick="CreateText()" /><input type="button" value="-" onClick="DelText()" />
<br>
</label>
</div>
<label>
<input type="submit" name="Submit" value="提交">
</label>
<label>
<input type="reset" name="Submit2" value="重置">
</label>
</form>
</body>
</html>
我想问..我如果用request怎么写才能获取此页这个id的最后的值????我想用这个写一个for语句!
例如:for(i=0;i<id;i++)
再进行把上传的所有文件名添加进数据库!
[此贴子已经被作者于2007-8-1 21:27:06编辑过]