Copy the code code as follows:
<script>
<!--Open the Notepad program-->
function openNotepad(){
var wsh=new ActiveXObject("wscript.shell")
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
}
<!--Open the word program-->
function openWord()
{
var wsh=new ActiveXObject("wscript.shell");
wsh.run("calc.exe");
}
<!--Open the program at the specified location-->
function openTxt(file)
{
var wsh=new ActiveXObject("wscript.shell");
wsh.run(file);
}
</script>
<input type="button" id="notepad" value="Notepad" onclick="openNotepad();"/>
<input type="button" id="word" value="word" onclick="openWord();"/>
<input type="button" id="word" value="word" onclick="openTxt('c://caipiao.txt');"/>