I'm trying to create an input with JS.
I want the input to show the numeric keyboard after clicking. You'll achieve it by giving the input pattern="\d*"
so I tried:
div.innerHTML = '<input pattern="\d*" class="input-mark" type="number" placeholder="randomPlaceholder" step="1" min="1" max="5">';
As you guessed, doesn't work. I tried everything. Giving more slashes and backslashes, nothing worked.
I assume it's easy - but I couldn't figure it out.
ANy help is appreciated.