html代码:html
<input type="text" onkeydown="enterPress(event);"/>jquery
jquery代码:spa
function enterPress(e) { if (e.keyCode == 13) { 执行的动做.................... }}htm