一点科技
您的当前位置:首页JavaScript调用客户端的可执行文件(示例代码)_javascript技巧

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

来源:一点科技


代码如下:


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);
}




显示全文