一個后綴bat的文件,如何將它放在html中自動打開?
網(wǎng)友解答: <script type="text/javascript"function start(strPath){ var objShell = new ActiveXObj
<script type="text/javascript"
function start(strPath){
var objShell = new ActiveXObject("wscript.shell");
objShell.Run(strPath);
objShell = null;
}
start("C:/Users/Administrator/Desktop/test.bat"); //應(yīng)用程序路徑
</script
網(wǎng)友解答:bat是電腦系統(tǒng)腳本文件,電腦也可以直接打開,但是html是超文本語言,它可以引入音視頻、圖片,也可以寫入js,jq等輕量級語言,bat文件引入也不會被編譯識別,你引入用戶點(diǎn)擊只能做下載操作!