问题代码应该是这样<form name="form1" method="post" action="some.asp" enctype="multipart/form-data" >
  <input type="file" name="file1" value="">
  <input type="submit" name="Submit" value="">
</form>
<a onclick=" document.form1.file1.click();" href="#">CLICK</a>

解决方案 »

  1.   

    不能,因为安全性考虑。如果可以的话,你可以用个隐藏的FORM,秘密上传用户机器上的文件了,假如你知道那些文件的路径的话
      

  2.   

    同意二楼论点!!!
    http://expert.csdn.net/Expert/topic/1350/1350963.xml?temp=.4764826
      

  3.   

    <form name="form1" method="post" action="some.asp" enctype="multipart/form-data" >
      <input type="file" name="file1" onkeydown="return false" onpaste="return false">
      <input type="submit" name="Submit" value="">
    </form>
      

  4.   

    thx all!!但是我的代码按下CLICK选择文件后按SUBMIT该input就会自动清空,提交不了,
    <form name="form1" method="post" action="some.asp" enctype="multipart/form-data" >
      <input type="file" name="file1" value="">
      <input type="submit" name="Submit" value="">
    </form>
    <a onclick=" document.form1.file1.click();" href="#">CLICK</a>
    为什么呢?怎样解决?
      

  5.   

    大哥,我实在不明白为什么你这么写??
    如下:不就行了?
    <a onclick=" document.form1.submit();" href="#">CLICK</a>