Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

input onenter go to next input field javascript

<input class='ui-widget-content ui-corner-all form-fullwidth' data-index="1" id='Tasudok' name='Tasudok' value='' maxlength='25' />
<input type="text" name="Toode" class="my-input" data-index="2" />
<input type="number" name="Kogus" data-index="3" />

$('#inputform').on('keydown', 'input', function (event) {
    if (event.which == 13) {
        event.preventDefault();
        var $this = $(event.target);
        var index = parseFloat($this.attr('data-index'));
        $('[data-index="' + (index + 1).toString() + '"]').focus();
    }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: html iframe and JS contentwindow 
Javascript :: jquery summernote set value 
Javascript :: count no of punctuation in string in js 
Javascript :: lodash remove undefined values from object 
Javascript :: vue watch props 
Javascript :: vuejs input text 
Javascript :: set timeout javascript 
Javascript :: jest match object properties 
Javascript :: javascript get all classes 
Javascript :: get css custom property javascript 
Javascript :: jquery detect change in textarea content 
Javascript :: strapi production build 
Javascript :: javascript write text 
Javascript :: javascript array concat spread operator 
Javascript :: vuejs react on route chagne 
Javascript :: get looping in jquery 
Javascript :: target url javascript 
Javascript :: jquery get element innertext 
Javascript :: generate thumbnail of pdf using pf js 
Javascript :: javascript get boolean if checkbox is checked 
Javascript :: get value from json.stringify 
Javascript :: discord js on message 
Javascript :: get random number node js 
Javascript :: javascript check if array has duplicates 
Javascript :: jquery remove link href 
Javascript :: get select2 selected value jquery 
Javascript :: javascript style multiple properties 
Javascript :: uncaught evalerror: refused to evaluate a string as javascript because 
Javascript :: jquery scrollheight 
Javascript :: check if function javascript 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =