event.keyCode ,event.which ,event.charCode
javascript判断是否按回车键
size="90" onkeypress="enterHandler(event);"/>
function enterHandler(event)
{
//获取用户单击键盘的“键值”
var keyCode = event.keyCode ? event.keyCode
: event.which ? event.which
原创
2017-07-06 15:42:40 ·
441 阅读 ·
0 评论