//监听回车

$(document).keydown(function(e) {
   if (e.keyCode == 13) {
   $("#btnLogin").click();
   }
})

//input绑定回车

$('#dataInput').bind('keypress',function(event){
    if(event.keyCode == "13")    
     {
       alert('你输入的内容为:' + $('#dataInput').val());
     }
});

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2019-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案