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
posted @ 2017-07-03 20:15  腾飞的博客  阅读(2986)  评论(0编辑  收藏  举报