Monday, April 17, 2017

Detect "Enter" keypress using jquery

Tags



Live Sample

Detect "Enter" keyPress 

Code (html)

<input type="text" id="txt"/>

Code(js)

$('#txt').keydown(function (e){
    if(e.keyCode == 13){
        alert('you pressed enter ^_^');
    }
})


 If you are facing any problem on this, don't hesitate to message at Obstrum facebook page.
Obstrum Facebook Page

 


EmoticonEmoticon