Home > Web Front-end > JS Tutorial > JavaScript calls the client's executable file (sample code)_javascript skills

JavaScript calls the client's executable file (sample code)_javascript skills

WBOY
Release: 2016-05-16 17:11:57
Original
925 people have browsed it

Copy code The code is as follows:

<script><br><strong>< !--Open the Notepad program--><br></strong>function openNotepad(){<br> var wsh=new ActiveXObject("wscript.shell")<br> wsh.run("notepad.exe") //If it can be run in "Run", you can write it directly here, otherwise you need to write the absolute path <br>}<br><strong><!--Open the word program--><br></strong> function openWord()<br>{<br> var wsh=new ActiveXObject("wscript.shell");<br> wsh.run("calc.exe");<br>}<br><strong>< !--Open the program at the specified location--><br></strong>function openTxt(file)<br>{<br> var wsh=new ActiveXObject("wscript.shell");<br> wsh.run(file );<br>}<br></script>




Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template