模拟input file 实现自定义边框

来源:互联网 发布:火车票什么软件最好 编辑:程序博客网 时间:2024/06/05 12:45

<html>    
  <head> 
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"> 
  <title>New   Page   7</title> 
  <script> 
  function   test()   { 
  with(document.frm1)   { 
  F1.click(); 
  FileName.value   =   F1.value; 
  } 
  } 
  </script>     
  </head> 
  
  <body> 
  
  <form   name="frm1"   method="POST"   enctype="multipart/form-data"> 
  <input   type="file"   id="F1"   name="F1"   size="20"   style="display:none"> 
  <input   type="text"   name="FileName"   size="20" style="border: 1px solid #B4C9DC"> 
  <input   type="button"   value="TEST"   name="B1"   onclick="test()"> 
  </form> 
  
  </body> 
  
  </html>

原创粉丝点击