Длинна пароля<input type="tel" placeholder="" value="" id="passHeight" maxlength="2" onclick="this.select();" required pattern="[0-9]{,3}" style="display: inline-block;"> so that when the value changes after a reboot it remains
Длинна пароля<input type="tel" placeholder="" value="" id="passHeight" maxlength="2" onclick="this.select();" required pattern="[0-9]{,3}" style="display: inline-block;"> so that when the value changes after a reboot it remains
As you said, localStorage. But it only works on the https protocol.
https://codepen.io/anon/pen/VBOzqv
This snippet will not work here, to check the result, go to the codepen link
document.getElementById("passHeight").value = localStorage.getItem('fieldDeeta'); function handleInput() { localStorage.setItem('fieldDeeta', document.getElementById("passHeight").value); } Длинна пароля<input type="tel" placeholder="" value="" id="passHeight" maxlength="2" onclick="this.select();" required pattern="[0-9]{,3}" style="display: inline-block;" oninput="handleInput()"> Source: https://ru.stackoverflow.com/questions/868867/
All Articles