输入框的回车事件


//bind 可以换成on
$('#inputtext').bind('keypress',function(event){ 
         //13 代表的是回车健 
         if(event.keyCode == 13)      
         {  
             alert('你点击了回车');  
         }  
     });

猜你喜欢

转载自blog.csdn.net/yuzhoaheyou/article/details/80592085