复制代码 代码如下:
<script>
<!--打开记事本程序-->
function openNotepad(){
var wsh=new ActiveXObject("wscript.shell")
wsh.run("notepad.exe")//如果在“运行”可以运行就可以在此直接写,否则要写上绝对路径
}
<!--打开word程序-->
function openWord()
{
var wsh=new ActiveXObject("wscript.shell");
wsh.run("calc.exe");
}
<!--打开指定位置程序-->
function openTxt(file)
{
var wsh=new ActiveXObject("wscript.shell");
wsh.run(file);
}
</script>
<input type="button" value="Notepad"/>
<input type="button" value="word" />
<input type="button" value="word" />
新闻热点
疑难解答
图片精选