Move the cursor to another field when a certain character is typed using jquery.

If you want to apply for a different character then please find out the correct "event keycode" for that.

use following link to know character keycode.
https://keycode.info/

Lets move towards coding part.

HTML==>
<input id="input1"/><input id="input2"/>

JQury==>
$('#input1').keypress(function(e) {
 if(e.keyCode == 32) {
   e.preventDefault();
   $('#input2').focus();
  }

});

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Remove GIT integration from VSCode