upfiletofile.asp

来自「能进行网上购物的需求」· ASP 代码 · 共 52 行

ASP
52
字号
<HTML>
<HEAD>
<STYLE TYPE="text/css">
<!--
.p9{ font-size: 9pt; font-family: 宋体 }
td {font-size: 9pt}
.tx {height: 16px; width: 30px; border-color: #6699CC; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; background-color: #eeeeee; color: #0000FF}
.tx2 {height: 16px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; color: #0000FF; border-left-color:#6699CC; border-right-color:#6699CC; border-top-color:#6699CC; border-bottom-color:#6699CC}
.bt {border-left:1px solid #6699CC; border-top:1px solid #6699CC; font-size: 9pt; border-right-width: 1; border-bottom-width: 1; height: 16px; width: 80px; background-color: #6699CC; cursor: hand; border-right-style:solid; border-bottom-style:solid}
.tx1 { width: 260 ;height: 20px; font-size: 9pt; border: 1px solid; border-color: #6699CC; color: #0000FF}
-->
</STYLE>
<SCRIPT LANGUAGE="vbscript">
function addfile()
dim str
str="<table>"
if not IsNumeric (window.form1.filenum.value) then window.form1.filenum.value =1
for i=1 to window.form1.filenum.value
str=str&"<tr><td valign='middle'>图片"&i&":</td><td><input type='file' name='file"&i&"' class='tx1' size='20'>  图片另存为<input type='text' name='file"&i&"' size='25' class='tx2'></td></tr>"
next
window.uptd.innerHTML =str&"</table>"
end function
</SCRIPT>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"></HEAD>
<body text="#000000" leftmargin="0" topmargin="2" marginwidth="0" marginheight="0" BGCOLOR="#ffffff" CLASS="p9" onLoad="addfile()">
<%
if session("admin_name")="" then
    response.redirect "../default.asp"
end if
%>
<TABLE WIDTH="99%" BORDER="1" ALIGN="center" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#6699CC" STYLE="BORDER-COLLAPSE: collapse">
<FORM METHOD="post" NAME="form1" ACTION="savetofile.asp" ENCTYPE="multipart/form-data">        
 <TR> 
    <TD HEIGHT="27" COLSPAN="2">上传 
              <INPUT NAME="filenum" CLASS="tx2" VALUE="1" SIZE="4">
              张图片   
              <INPUT TYPE="button" NAME="Button" CLASS="bt" onClick="addfile" VALUE="设 定">
            </TD>
          </TR>
          <TR> 
            <TD> <DIV ID="uptd"> </DIV></TD>
          </TR>
          <TR> 
            <TD HEIGHT="30" COLSPAN="2" ALIGN="middle"> 
              <INPUT TYPE="submit" NAME="Button" CLASS="bt" VALUE="上 传"> <INPUT TYPE="reset" NAME="Button" CLASS="bt" VALUE="重 置">
            </TD>
          </TR>
       </FORM>
  </TABLE>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?