javascript调用Exe文件的方法
2010-11-26 17:57 zhaoyang 阅读(854) 评论(0) 编辑 收藏 举报<script type="text/javascript">
function Run(strPath)
{
try
{
var objShell = new ActiveXObject("wscript.shell");
objShell.Run(strPath);
objShell = null;
}
catch (e)
{
alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确,而且所需的库文件均可用。')
}
}
Run('file:///C:/Program%20Files/360/360se3/360se.exe');
</script>