用ylib_getObj()附加更多文件
<script language="javascript">
var nextHiddenIndex = 3;
function AddFileInput()
{
ylib_getObj("fileInput" + nextHiddenIndex).style.display=document.all?"block" : "table-row";
nextHiddenIndex++;
if(nextHiddenIndex >= 6) ylib_getObj("attachMoreLink").style.display = "none";
}
</script>
<table style="margin:1em 0 1em 0">
<tr valign="top" id="fileInput0" >
<td><b>文件 1:</b></td>
<td><input type=file name=userFile0 size=20 onKeyPress="KeyPress()" ></td>
</tr>
<tr valign="top" id="fileInput1" >
<td><b>文件 2:</b></td>
<td><input type=file name=userFile1 size=20 onKeyPress="KeyPress()" ></td>
</tr>
<tr valign="top" id="fileInput2" >
<td><b>文件 3:</b></td>
<td><input type=file name=userFile2 size=20 onKeyPress="KeyPress()" ></td>
</tr>
<tr valign="top" id="fileInput5" style="display:none">
<td><b>文件 4:</b></td>
<td><input type=file name=userFile5 size=20 onKeyPress="KeyPress()" ></td>
</tr>
<tr valign="top" id="fileInput6" style="display:none">
<td><b>文件 5:</b></td>
<td><input type=file name=userFile6 size=20 onKeyPress="KeyPress()" ></td>
</tr>
<tr valign="top" id="fileInput7" style="display:none">
<td><b>文件 6:</b></td>
<td><input type=file name=userFile7 size=20 onKeyPress="KeyPress()" ></td>
</tr>
</table>
<p id="attachMoreLink"><a href="javascript:AddFileInput()">附加更多文件</a></p>
请问各位,在上面这段代码中,我点击一下“附加更多文件” 应该会出现一个fileinput
但现在没有反映,不知道哪里有问题