upfile.htm

来自「创建和运行动态、交互的Web服务器应用程序」· HTM 代码 · 共 51 行

HTM
51
字号
<html>
<head>
<title>荣拓网上书店图片上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td {  font-size: 9pt}
a {  color: #000000; text-decoration: none}
a:hover {  text-decoration: underline}
.tx {  height: 16px; width: 30px; border-color: black black #000000; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; background-color: #E8F1FF; color: #0000FF}
.bt {  font-size: 9pt; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; height: 16px; width: 80px; background-color: #eeeeee; cursor: hand}
.tx1 { height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #000000}
-->
</style>
<script language=javascript>
function checkImage(sId)
{
  if(( document.all[sId].value.indexOf(".gif") == -1) && (document.all[sId].value.indexOf(".jpg") == -1)) {
    alert("请选择gif或jpg的图象文件");
    event.returnValue = false;
    }
}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" topmargin="10">

<table width="98%" border="1"  align=center cellspacing="0" cellpadding="0" bordercolordark="#ece9d8" bordercolorlight="#666666">
   <form name="form1" method="post" action="upfile.asp" enctype="multipart/form-data" onsubmit="checkImage('file1')">

    <input type="hidden" name="act" value="upload"> 
    <tr> 
       <td height="22" align="center" bgcolor="#CCCCCC">&nbsp;图书封面上传</td>
    </tr>
    <tr> 
       <td height="60" align="left" bgcolor="#ece9d8" id="upid"><input type="hidden" name="filepath" value="../bookpic/">
        文件位置<input type="file" name="file1" style="width:400" class="tx1" value="">&nbsp;<font color="#FF0000">图片长宽65*96</font></td>
    </tr>
    <tr> 
      <td bgcolor="#eeeeee" height="24" align="center">
      <input type="submit" name="Submit"  value="提 交" class="bt">
      <input type="reset"  name="Submit2" value="清 除" class="bt">
      </td>
    </tr>

  </form>
</table>

</body>
</html>

⌨️ 快捷键说明

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