function ExeApp(app){
   if (app!="") {
   try {
   var Exc=new ActiveXObject("WScript.Shell")
   Exc.Run(app)
   }
   catch(err) {
   alert("不能打开应用程序!")
   }
   }
  }注明:参数app应该是像这样的:C:\\Winnt\\dsn.txt

解决方案 »

  1.   

    test1.htm  可以打开Media Player.<a href="1.asx">Open Media Player</a>1.asx
    <asx version = "3.0">
    <title>demo</title>
    <entry>
    <ref href = "song.wma"/>
    </entry>
    </asx>
    test2.htm 打开RealPlayer<a href="1.ram">Open RealPlayer</a>1.ram
    song.rm
      

  2.   

    <html>
    <head>
    <script language="vbscript">
    Function openLocalApplication(shell)
    set obj=createobject("Wscript.Shell")
    obj.run(shell)
    End Function
    </script>
    </head>
    <body>
    <br>
    <br>
    <a href='vbscript:openLocalApplication("notepad")'>打开本地的记事本应用程序</a>
    <br>
    <a href='vbscript:openLocalApplication("btdownloadgui.exe")'>打开FlashGet</a>
    </body>
    </html>
      

  3.   

    不能创建‘Wscript.Shell’??!!