用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
但现在没有反映,不知道哪里有问题
------解决方案--------------------ylib_getObj方法从哪里来的?
------解决方案--------------------确定后,再加入这个方法即可!
------解决方案--------------------如果存在ylib_getObj对象
以下改为:(序号排列错误)
<table style= "margin:1em 0 1em 0 ">
<tr valig