jquery - change input value when go to next

Pedram

When you press tab button while you typing in an input[text] you will go to next input automatically, when you fill up all inputs and after again want to re-fill them, values will highlight with blue color, so i tried to do this without pressing tab button, it's already go to next input but it will not highlight to get new value and you have to drag (select all) the value to replace new one.

so i want to when it go to next value WHEN it already filled up it get blue highlight and editable. please see my JSFiddle and fill up all input then re-fill them then you will see you can not change value until you drag the value to change.

JSFiddle

$(".digits").keyup(function () {
    if (this.value.length == this.maxLength) {
      $(this).prev('.digits').focus();
    }
});
Bhushan Kawadkar

Try this: you can add focus event handler and select all text in the input box. See below code and JSFiddle demo

$(".digits").focus(function(){
  $(this).select();
});

JSFiddle Demo

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Change input value depending on list order in jQuery

분류에서Dev

jquery : How to bind change event when the input is not from the user

분류에서Dev

JQuery Select Input By Value

분류에서Dev

jquery unable to change hidden input

분류에서Dev

xml select next node and change value of that node

분류에서Dev

WPF Binding: How to prevent target update when source value does not change after input

분류에서Dev

jQuery if/else based on input value

분류에서Dev

Input tag file value jquery

분류에서Dev

Change value of variable with jquery or javascript

분류에서Dev

jQuery .change selected value preselected

분류에서Dev

Change global variable value jQuery

분류에서Dev

How to change html input multiple value

분류에서Dev

Why is a dynamic input value not showing a change with Angularjs?

분류에서Dev

jQuery setting input using val() and activating change()

분류에서Dev

why getchar() doesn't get next value from input?

분류에서Dev

Jquery copy input value to other forms

분류에서Dev

setting a text input value via jquery mobile

분류에서Dev

Setting input value when moving 'scroll control'

분류에서Dev

jQuery fading cells when got specific input

분류에서Dev

Using jquery slider to change filter blur value

분류에서Dev

update html table when dropdown value change

분류에서Dev

Call jquery function when <ul> content change

분류에서Dev

Using event trigger how to pass the value to function on input change

분류에서Dev

Change input value inside TD using row and column index

분류에서Dev

Jquery Change color by input[type=text] keydown not working

분류에서Dev

change volume of video using range input using jquery

분류에서Dev

jQuery/CoffeeScript/Rails doesn't call change() on my input

분류에서Dev

.on ( "change", "input [name ^ =에 대한 jquery 구문

분류에서Dev

How can I create jquery previous and next buttons that go through URLs in an array (pagination)

Related 관련 기사

  1. 1

    Change input value depending on list order in jQuery

  2. 2

    jquery : How to bind change event when the input is not from the user

  3. 3

    JQuery Select Input By Value

  4. 4

    jquery unable to change hidden input

  5. 5

    xml select next node and change value of that node

  6. 6

    WPF Binding: How to prevent target update when source value does not change after input

  7. 7

    jQuery if/else based on input value

  8. 8

    Input tag file value jquery

  9. 9

    Change value of variable with jquery or javascript

  10. 10

    jQuery .change selected value preselected

  11. 11

    Change global variable value jQuery

  12. 12

    How to change html input multiple value

  13. 13

    Why is a dynamic input value not showing a change with Angularjs?

  14. 14

    jQuery setting input using val() and activating change()

  15. 15

    why getchar() doesn't get next value from input?

  16. 16

    Jquery copy input value to other forms

  17. 17

    setting a text input value via jquery mobile

  18. 18

    Setting input value when moving 'scroll control'

  19. 19

    jQuery fading cells when got specific input

  20. 20

    Using jquery slider to change filter blur value

  21. 21

    update html table when dropdown value change

  22. 22

    Call jquery function when <ul> content change

  23. 23

    Using event trigger how to pass the value to function on input change

  24. 24

    Change input value inside TD using row and column index

  25. 25

    Jquery Change color by input[type=text] keydown not working

  26. 26

    change volume of video using range input using jquery

  27. 27

    jQuery/CoffeeScript/Rails doesn't call change() on my input

  28. 28

    .on ( "change", "input [name ^ =에 대한 jquery 구문

  29. 29

    How can I create jquery previous and next buttons that go through URLs in an array (pagination)

뜨겁다태그

보관