复制代码代码如下:
function openNotepad(){
var wsh=new ActiveXObject("wscript.shell")
wsh.run("notepad.exe")//如果在“运行”可以运行就可以在此直接写,否则要写上绝对路径
}
function openWord()
{
var wsh=new ActiveXObject("wscript.shell");
wsh.run("calc.exe");
}
function openTxt(file)
{
var wsh=new ActiveXObject("wscript.shell");
wsh.run(file);
}