【发布时间】:2022-01-05 16:27:27
【问题描述】:
我想编写一个 HTA JScript,它忽略输入文本字段的值,当按下回车按钮时,会执行 callShellApplication(结合 echo 命令的值和输入文本字段的值)。
这是我已经拥有的代码的 sn-p:
<label for="uname">Command: </label>
<input type="text" style="color:black; id="command" name="name" required size="20"
pattern="[a-z]{4,8}">
<button onclick="callShellApplication('cmd /d /c echo/ &[The value of the text field should be entered here]')">Enter</button>
我可以在那里做什么?
更新:我通过从 hta 文件启动一个批处理文件(使用 2 个命令)解决了这个问题。
【问题讨论】: