|
请求协助,找不到对象变量
截图
本弹出窗口源代码
<html>
<head>
<title>文件上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<link href="../theme/Master.css" rel="stylesheet" type="text/css" />
<script src="../js/rnd.js"></script>
</head>
<base target="_self">
<body style="margin:20px 10px 10px 20px" >
<FORM METHOD="POST" NAME="upform" action="uploadfile_result_c.jsp?type=1&path=4" ENCTYPE="multipart/form-data" >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table id="uploadTable" width="80%" border="0" cellpadding="0" cellspacing="0" class="table_blue">
<tr>
<th colspan="2">文件上传</th>
</tr>
<tr>
<td colspan=2 height="25" align="center">单个文件最大上传5MB,总最大上传20M(doc/xls/txt/pdf/zip/wps/et)</td>
</tr>
<tr height="25">
<td width="30%">选择上传文件[1]</td>
<td width="70%">
<input type="FILE" name="FILE1" size="30" style="border : 1px solid #008000;">
<input type="button" value="新增附件" onclick="insertRow();" style="height:18px;border : 1px solid #008000;">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<input type="button" class="ok" value="上 传" onclick="upload()"/>
<input type="button" class="return" onClick="javascript:window.close();" value="取消" />
</td>
</tr>
</table>
</form>
</body>
<script language="javascript">
<!--
function upload() {
var timestamp = timemark();
var files=document.getElementsByName("FILE1");
if(files[0].value==""){
alert("请选择文件");
return false;
}
document.upform.action="uploadfile_result_c.jsp?type=1&path=4&timemark="+timestamp;
document.upform.submit();
}
function insertRow(){
table=document.getElementById("uploadTable");
index = table.rows.length;
if(index<=5){
nextRow = table.insertRow(index);
cell0 = nextRow.insertCell(0);
cell1 = nextRow.insertCell(1);
cell0.innerHTML ="选择上传文件["+(index-1)+"]";
cell1.innerHTML ="<input type=\"FILE\" name=\"FILE1\" size=30 style=\"border : 1px solid #008000;\"></span>";
}
}
//-->
</script>
</html> |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|