JS 在web页面中调用本地应用程序

在web页面中调用本地应用程序

 1 <script type="text/javascript">
 2     $(function () {
 3         $(".navbox-tiles a").click(function () {
 4             Run("C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE");
 5         });
 6     });
 7 
 8     function Run(strPath) {
 9         try {
10             var objShell = new ActiveXObject("wscript.shell");
11             objShell.Exec(strPath);
12             objShell = null;
13         }
14         catch (e) {
15             alert(e);
16         }
17     }
18 </script> 
View Code
原文地址:https://www.cnblogs.com/tengfei8/p/7112864.html