a****t 发帖数: 1007 | 1 HTML设置了一个按钮,执行下面的function。
function executeprogram(){
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.run("C:\Work\Executeprogram.cmd");
alert("Finished executing program!");
}
问题是Executeprogram.cmd执行需要大概20-30秒,执行中,"Finished executing
program!"的提示就已经出现了。有什么方法让Finished executing program!的提示在
Executeprogram.cmd执行完后再出现。谢谢。 | j*******o 发帖数: 34 | 2 You may want to use callback.
Or, you have to check the status to make sure your job is done, then alert. |
|