我如何在asp.net中获取按钮的KeyCode [英] How to get the KeyCode of the Button i press in asp.net
本文介绍了我如何在asp.net中获取按钮的KeyCode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好....是否有任何crossBrowser JavaScript代码可以在我的C#.net代码中获取按钮的键代码.
Hi everyone.... Is there any crossBrowser JavaScript Code code that can get the Key Code of a button in my C#.net Code.
推荐答案
<script language="javascript" type="text/javascript">
document.onkeypress = function () { alert(window.event.keyCode); }
</script>
这篇关于我如何在asp.net中获取按钮的KeyCode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文