<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="top.jsp"%>
<%@ page import="org.apache.struts.action.*" %>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><bean:message key="welcome.jsp.title"/></title>
<link href="../skins/skin/1.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/text.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%@ include file="admintop.jsp"%>
<br>
<br>
<html:form action="loadfile.do" enctype="multipart/form-data">
<table>
<%
String array[] = new String[11];
request.setAttribute("array",array);
%>
<logic:iterate id="a" name="array" indexId="ind" offset="1" type="java.lang.String">
<TR id="fileInput<%=ind%>" style="display:none">
<TD height=30>

上传:
<html:file property="file" indexed="true" />
          <a href="javascript:delFileInput(fileInput<%=ind%>)">移除附件</a>
</TD>
</TR>
</logic:iterate> 
<TR id="adminfile" style="display:block">
<TD height=30>
<a href="javascript:AddFileInput()">添加附件</a>
</TD>
</TR>
</table>
<br /><br />
<html:submit />
</html:form>
<p>
</body>
  <script language=javascript> var nextHiddenIndex = 1;
    function AddFileInput()
{
for (var i=1;i<=10;i++)
{
var test1 =  document.getElementById ("adminfile");
if (i>=10){
test1.style.display="none";
}

var test =  document.getElementById ("fileInput"+i); 
if (test.style.display!="block")
{
test.style.display="block";
return;
}
}

}
 function delFileInput(str)
{
str.style.display="none";
document.getElelmentById("file").value="aa"; 
var test1 =  document.getElementById ("adminfile");
test1.style.display="block";

return;
}
    </script>
</html:html>
我有十个上传文件的,比如说我己经写入五个了,但是我不想要其中的一个了,我点击他后面的删除,实际上我给他隐藏了,但是文本框里还有那个文件,我怎么样才能把那个文本框变成空呢