判断存在用fso(Scripting.FileSystemObject)打开文件用word.application

解决方案 »

  1.   

    <script language=javascript>
    var fso=new ActiveXObject("Scripting.FileSystemObject");
    var filepath="c:\\AdobeWeb.log";
       if (fso.FileExists(filepath))
          document.write("存在");
       else 
          document.write("不存在");
    </script>
      

  2.   

    <script language="JavaScript">
    function open_exe(shellp,str)
    {
    a=new ActiveXObject("wscript.shell");
    a.run(shellp+" "+str);
    }
    </script>
    <button onclick="open_exe('winword.exe','c:\\long.doc')">打开word</button>