如何在点击一个超链接后直接弹出选择文件的对话框?
也就是隐藏掉 <input   type= "file "> ,而用如 <a   onclick= "javascript:showDia() "> 上传文件 </a> 这样来实现,请问showDia()这个函数该如何写?
------解决方案-------------------- <html>  
  <body>    
  <input type= "file " id= "file " />  
  <a href= "javascript:document.getElementById( 'file ').click() "> 浏览 </a>    
  </body>  
  </html>
------解决方案--------------------楼上的,请不要误导人,那种方法不行的。   
 虽然能看到效果,但是form提交的时候会清空file控件的。   
 详细请看   
 http://blog.csdn.net/mmcgzs/archive/2007/03/29/1545764.aspx