Maison  >  Article  >  interface Web  >  JavaScript调用客户端的可执行文件(示例代码)_javascript技巧

JavaScript调用客户端的可执行文件(示例代码)_javascript技巧

WBOY
WBOYoriginal
2016-05-16 17:11:57857parcourir

复制代码 代码如下:

<script><BR><STRONG><!--打开记事本程序--><BR>function openNotepad(){<BR> var wsh=new ActiveXObject("wscript.shell")<BR> wsh.run("notepad.exe")//如果在“运行”可以运行就可以在此直接写,否则要写上绝对路径<BR>}<BR><STRONG><!--打开word程序--><BR>function openWord()<BR>{<BR> var wsh=new ActiveXObject("wscript.shell");<BR> wsh.run("calc.exe");<BR>}<BR><STRONG><!--打开指定位置程序--><BR>function openTxt(file)<BR>{<BR> var wsh=new ActiveXObject("wscript.shell");<BR> wsh.run(file);<BR>}<BR></script>




Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn