📄 index.html
字号:
<html><head>
<title>
上传文件</title>
<script type="text/javascript">
<!--
function setid(){
var n = 0;
var Obj01 = window.UpLoad_Form.upcount;
str='';
var MaxNum = {{maxfilenum}};
if(!Obj01.value){Obj01.value = 1;}
if(Obj01.value == 0){Obj01.value = 1;}
if(Obj01.value > MaxNum){
alert("您最多只能同时上传 " + MaxNum + " 个文件!");
Obj01.value = MaxNum;
setid();
}
else{
for(n=1;n<=Obj01.value;n++){
str += '文件';
if(n < 10)(str += 0)
str += n+':<input type="file" name="strFile' + n + '" id="strFile' + n + '"><br>';
window.upid.innerHTML = str;
}
}
}
//JS提交表单函数。有必要可以修改表单的Action为"Index.asp?Action=Upload",但这样无法使用验证码。
function submitform()
{
var vcode;
var temp;
vcode=document.getElementById("CodeStr").value;
if(vcode!="")
{
temp="&CodeStr="+vcode;
}
else
{
temp=""
}
UpLoad_Form.action = "Index.asp?Action=Upload"+temp;
UpLoad_Form.submit();
}
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><style type="text/css">
<!--
body {
font-size: 12px;
color: #333333;
font-family: 宋体;
background-color: #B5BCC7;
scrollbar-highlight-color: #98A0AD;
scrollbar-arrow-color: #FFFFFF;
scrollbar-base-color: #7D899D;
margin: 0;}
td{
Font-family:宋体; Font-size: 12px; Line-height: 20px; Line-height: 150%;Table-layout:Fixed;Word-break:Break-all
}
input {
Font-family:Verdana, Arial, Helvetica, Sans-serif,宋体; Text-decoration: None; Border-top-width: 1px; Border-left-width: 1px; Font-size: 12px; Border-bottom-width: 1px; Border-right-width: 1px
}
-->
</style></head>
<body>
<table width="98%" align=center cellpadding=0 cellspacing=1 bgcolor="cccccc" style="border: 1px #335EA8 solid ;
background-color: #C9C9C3;
font: 12px;
width: 98%">
<tr>
<th colspan="2" style="background-color: #335EA8;
color: white;
font-size: 12px;
font-weight:bold;
height: 26;">上传文件 </th>
</tr>
<tr>
<td style="background-color: #EEEEE6;
height: 25;
padding-right: 5px;
padding-left: 5px;" height="120px"><form action="" method="post" enctype="multipart/form-data" id="UpLoad_Form" name="UpLoad_Form">
<table align="center" border="0" cellpadding="2" cellspacing="0">
<tr>
<td align="left"> {{filenum}} {{setnum}}
<input name="Files" type="hidden" id="Files" value="" /> </td>
</tr>
<tr>
<td colspan="2" align="left" id="upid"> 文件01:
<input name="strFile1" type="file" /> </td>
</tr>
<tr>
<td colspan="2" align="left" id="Upload"> {{vcode}}<br />
<input name="button" type="button" onclick="return submitform()" value=" 上 传 文 件 " /> </td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -