Jquery focus on first text field and set cursor at value end for instant data entry

前端 未结 2 672
無奈伤痛
無奈伤痛 2020-12-29 08:27

I am loading a form and defaulting focus to the first text field. The text field is populated with a default value \"PW-\". (The first characters of the customers part numbe

2条回答
  •  天涯浪人
    2020-12-29 09:06

    Something a little different: maybe try setting your "PW-" just in text to the left of the text input field. Validate against non-numbers in the field and then when submitting the form, prepend the "PW-" to that field's value, so that you have a complete part number.

提交回复
热议问题