How to trigger HTML button when you press Enter in textbox?

后端 未结 12 1273
悲哀的现实
悲哀的现实 2020-12-04 08:13

So the code that I have so far is:

&
12条回答
  •  时光取名叫无心
    2020-12-04 08:49

        
    
    $('#input_id').keydown(function (event) {
        if (event.keyCode == 13) { 
             // Call your function here or add code here
        }
    });
    

提交回复
热议问题