ActiveXObject("Wscript.Shell");
这个东西可以响应键盘事件 [WshShell.SendKeys()]
<html>
<body>
<table>
<tr><td onclick="selecttoolid('find')">查找</td></tr>
</table>
</body>
</html>
<script language="javascript">
function selecttoolid(id){
var WshShell = new ActiveXObject("Wscript.Shell");
switch(id){
case 'find':
try{WshShell.SendKeys("^f");} catch(e){}
break
}
WshShell.Quit;
}
</script>
<body>
<table>
<tr><td onclick="selecttoolid('find')">查找</td></tr>
</table>
</body>
</html>
<script language="javascript">
function selecttoolid(id){
var WshShell = new ActiveXObject("Wscript.Shell");
switch(id){
case 'find':
try{WshShell.SendKeys("^f");} catch(e){}
break
}
WshShell.Quit;
}
</script>

浙公网安备 33010602011771号