标签: javascript shell vbscript sendkeys wsh
我们在VBScript中有Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys("1")。是否有任何类似的声明在javascript中发送键击。
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("1")
答案 0 :(得分:2)
有了警告,它默认不会在浏览器中工作,这将使用WSH;
var WshShell = new ActiveXObject("WScript.Shell"); WshShell.SendKeys("1");