⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upload_source1.php

📁 php做的上传工具~~必须先配置好文件~用的是XML
💻 PHP
字号:
<script language="JavaScript">
<!--获得焦点
  /*function NameGetFocus()
   {
     document.form1.filename.focus();
-->
   }*/

<!--检查输入内容的合法性
  function CheckValid()
    {  
	
	  
	if(document.form1.filename.value=="")
	{
					      if(document.form1.version.value=="")
						  {
						   if(document.form1.author.value=="")
						   {
						    if(document.form1.contact.value=="")
							{
							 if(document.form1.message.value=="")
							 {
							    alert("你没有输入任何信息");
								document.form1.filename.focus();
								return false;
							 }
							}
						   }
						  }
					   }
	  			   
	  if(document.form1.filename.value=="")
	    {
		  alert("请写上你上传资源的文件名!");
		  document.upload.filename.focus();
		
		  
		  return false;
		  
		}
		 else if(document.form1.version.value=="")
		    {
			  alert("请写上你传资源的版本号!");
			  
			  document.form1.version.focus();
			  
			  return false;
			  
			}
			 else if(document.form1.author.value=="")
			   {
				 alert("请写上你称呼!");
				 document.form1.author.focus();
				 
				 return false;
			   }
			    else if(document.form1.contact.value=="")
				   {
				     alert("请上你的联系方式!");
					 document.form1.contact.focus();
					
				     return false;
				   }
				    else if(document.form1.message.value=="")
					   {
					     alert("请写上传文件的简介!");
						 document.form1.message.focus();
						
						 return false;
					   }
					  else if(document.form1.SafeCodeinput.value=="")
	                    {
	                      alert(" 请输入验证码!");
						  document.form1.SafeCodeinput.focus();
						  return false;
						 }	
					
					   
	

 }



-->
</script>
<html>
<head>
<title>资源共享--文件上传(1)</title>

</head>			   
				    	 
<body>
 <div align="center">
  <h2 align="center"><font color="000000">上传资源的详细信息</font></h2>
    <table width="60%" border="1" align="center" bgcolor="#E3E3E3">
	  
      <form action="upload_source2.php"  name="form1" method="post" onSubmit="return CheckValid();">
	  
        <tr>	
	      <td width="22%" bgcolor="#F0F0F0"><font color="#000000">文件名:</font></td>
	      <td colspan="2" width="78" bgcolor="#F0F0F0"><font color="#00FF00">
	        <input type="text" name="filename" size="40" value="" style="behavior:url(#default#userdata)"><font color="#3366FF">*</font></font></td>
       </tr>
       <tr>
        <td width="22%" bgcolor="#F0F0F0"><font color="#000000">版本号:</font></td>
	    <td colspan="2" width="78" bgcolor="#F0F0F0"><font color="#00FF00">
	      <input type="text" name="version" size="40" value=""><font color="#3366FF">*</font></font></td>
       </tr>
       <tr>
         <td width="22%" bgcolor="#F0F0F0"><font color="#000000">上传者:</font></td>
	     <td colspan="2" width="78" bgcolor="#FOFOFO"><font color="#00FF00">
	       <input type="text" name="author" size="40" value=""><font color="#3366FF">*</font></font></td>
       </tr>
       <tr>
         <td width="22%" bgcolor="#F0F0F0"><font color="#000000">联系方式:</font></td>
	     <td colspan="2" width="78" bgcolor="#F0F0F0"><font color="#00FF00">
	       <input type="text" name="contact" size="40" value=""><font color="#3366FF">*</font></font></td>
       <tr>
       <tr>
         <td colspan="3" valign="middle" align="left">
	       <div align="center"><font color="#000000">文件简介:</font><font color="#3366FF">*</font><br/>
	         <textarea rows="6" name="message" cols="55" wrap="virtual" ></textarea></div></td>   	
       </tr>
		 <tr>
          <td colspan="3" height="22">
	       <div align="center"><font color="#000000">
		   请输入验证码:
          <input type="text" name="SafeCodeinput" size="4" maxlength="4">
           <img src="testcode.php" />
		  
		    &nbsp;&nbsp;&nbsp;
	          <input type="submit" name="next" value="下一步" >
			 
		         &nbsp;&nbsp;&nbsp;
		            <input type="reset" name="cencel" value="重  置" ></font></div></td>
       </tr>

	  </form>
   </table>
	   
	
</div>    
</body>
</html>

⌨️ 快捷键说明

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