[英]How do I close a window that was opened with a .hta from the command line? (not manually)
Say I give the command test.hta 说我给命令test.hta
A window pops up displaying the page. 弹出一个窗口显示页面。 How do I close that window from the command line?
如何从命令行关闭该窗口? I can't do it manually because I'm not present.
我不在场,因此无法手动执行。 It's a batch script running.
这是一个正在运行的批处理脚本。
The commenter above helped me solve the issue. 上面的评论者帮助我解决了这个问题。 It can be done by the jscript code in the .hta file.
可以通过.hta文件中的jscript代码完成。 Here is the pattern:
这是模式:
<html>
<head>
<script type="text/javascript">
function myclose()
{
close();
}
setTimeout(myclose, 3000);
</script>
</head>
<body>
The Sun is shining down on you today :)
</body>
</html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.