一切皆有可能

相信自己

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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>

 

posted on 2008-12-26 09:32  李泉生  阅读(158)  评论(0)    收藏  举报