多文件、表单混合上传类

asp

2008-05-08 11:58

<html>
<head>
<title>多文件、表单混合上传类</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
    body {
           margin: 0px;
           border: 0px;
           font-size: 10pt;
    }
    table {
           border-collapse: collapse;
           font-size: 10pt;
    }
    td {
           font-size: 10pt;
    }
</style>
<script language="javascript">
    function formCheck(_form) {
         for (var i = 0; i < _form.elements.length; i ++) {
              if (_form.elements[i].value == '') {
                  window.alert('请将表单填写完整,提交失败!');
                  return false;
              }
         }
         return true;
    }
</script>
</head>
<body>
   <br><br>
   <form action="12.asp" method="post" enctype="multipart/form-data" onsubmit="return formCheck(this);">
   <table width="400" align="center" cellpadding="2" cellspacing="0" border="1" rules="box">
      <tr height="26">
         <td colspan="2" align="center" style="font: 12pt;color: red;">上传功能测试<br><br></td>
      </tr>
      <tr valign="top">
         <td height="30" style="padding-top:3px;">标题:</td>
         <td><input type="text" name="P_title" size="20" autocomplete="off"></td>
      </tr>              
      <tr valign="top">
         <td height="30" style="padding-top:3px;">类型:</td>
         <td>
             <select name="P_assort">
                 <option value="电子">电子</option>
                 <option value="医疗">医疗</option>
             </select>
         </td>
      </tr>   
      <tr valign="top">
         <td height="30" style="padding-top:3px;">小图:</td>
         <td><input type="file" name="P_p_w_picpath_s" onkeydown="return false;" oncontextmenu="return false;" onpaste="return false;" ondragenter="return false;"></td>
      </tr>                 
      <tr valign="top">
         <td height="30" style="padding-top:3px;">中图:</td>
         <td><input type="file" name="P_p_w_picpath_m" onkeydown="return false;" oncontextmenu="return false;" onpaste="return false;" ondragenter="return false;"></td>
      </tr>
      <tr valign="top">
         <td height="30" style="padding-top:3px;">大图:</td>
         <td><input type="file" name="P_p_w_picpath_b" onkeydown="return false;" oncontextmenu="return false;" onpaste="return false;" ondragenter="return false;"></td>
      </tr>      
      <tr>
         <td height="30" colspan="2" style="padding-top:3px;">介绍:</td>
      </tr>
      <tr>
         <td height="30" colspan="2" valign="top">
            <textarea name="P_content" cols="50" rows="5"></textarea>
         </td>
      </tr>
      <tr>
         <td colspan="2" valign="top" align="center">
            <br><input type="submit" value="提交"> <input type="reset" value="重置">
            <br><br>                  
         </td>
      </tr>   
   </table>
   </form>
</body>
</html>