<html   xmlns="http://www.w3.org/1999/xhtml"   xml:lang="gb2312"   lang="gb2312">  
  <head>  
  <title>   上传的时候<input   type="file">中用图片代替浏览按钮   </title>
  <script   language="javascript"   type="text/javascript">  
  function   fn_browse()  
  {  
  document.test_form.browse.click();
  document.test_form.file.value   =   document.all.test_form.browse.value;
  }  
  </script>  
  </head>  
  <body>  
   
  <form   name="test_form"   method="post"   ENCTYPE="multipart/form-data"   onsubmit="alert(document.test_form.browse.value);"   />  
  <input   type="file"   name="browse"   style="display:none;"   />  
  <input   type="text"   name="file"   />  
  <a   href="javascript:fn_browse();">  
  <img     name="btn"   width=50 height=20 src="1.jpg"   border="0"   />
  </a> 
  <br   />  
  <br   />  
  <input   type="submit"   name="提交表单"   />  
  </form>  
   
  </body>  
  </html>

相关文章:

  • 2021-07-27
  • 2021-11-22
  • 2021-06-11
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2021-12-20
猜你喜欢
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2021-12-14
  • 2021-05-21
相关资源
相似解决方案