N
N
nak-alexey2018-03-19 15:36:09
JavaScript
nak-alexey, 2018-03-19 15:36:09

How to initialize an element with a dynamically added attribute?

Hello! I'm making a jquery mobile application. When I create a list with a search filter and dynamically add the pattern attribute with the expression [0-9]{,3} (and with any other expression) via js,
a regular keyboard appears on the smartphone.

Through the object inspector, the element has an attribute, but nevertheless it does not work, please advise what can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kulaeff, 2018-03-20
@kulaeff

What exactly doesn't work? What behavior do you expect from the pattern attribute? This attribute only works on form submit, it doesn't work on input.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question