设为首页 | 加入收藏
当前位置:首页>>教程>>asp教程>> 在ie客户端模拟键盘输入!

在ie客户端模拟键盘输入!

时间:2006-5-21 22:00:59 来源:本站收集整理 作者:佚名
<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>