87,993
社区成员
发帖
与我相关
我的任务
分享<input id="unThecoupon" type="text" />
<script>
document.getElementById('unThecoupon').onkeypress = function (e) {
console.log(e.keyCode); //a:97, A:65
};
</script>


function keyevent(e){
e = e || window.event;
alert(e.shiftKey + ':' + e.keyCode);
}
document.onkeydown = keyevent;
