哈哈,搞定啦....<input style="display:none;" type="file" id="filelist">
<input type=button onclick="filelist.click();this.path=filelist.value;alert(this.path)" value="找文件">散分,有更好的解决方法,给50分.

解决方案 »

  1.   

    哇。好巧妙的想法。我一直嫌<input type=file>不好用css控制。尤其是那两个“浏览”,老是靠在上面。难看死了。这真是一个好办法。!!!
      

  2.   

    加路径,在hta文件下不会有提示!<script>
    function window.onload(){
        t.focus();
        var WshShell=new ActiveXObject("WScript.Shell")
        WshShell.sendKeys("d:\\4.gif")
    }
    </script>
    <input id=t type=file>
      

  3.   

    <script>
    var path=null;
    </script>
    <input type=file onchange="path=this.value;">
      

  4.   

    <script>
    new ActiveXObject("shell.application").BrowseForFolder(0, "My Programs", 0, "C:\Program Files")
    </script>