How do I pre populate a simple html form with html5 and javascript?
How do I pre populate a simple html form?
Hi - I am a javascript newbie...
Q: How do I pre populate a simple html form with html5 and javascript and without using php
with php I do this:
<input id="firstname" name="firstname" value="<?php echo $firstname; ?>" type="text" />
but now I want to not use php and just use javascript to pre fill the input id="firstname"
I have this below the form...
...
document.getElementById('firstname').textContent = localStorage.getItem("firstname");
...
Q: How do I get the input form to pre fill first name?
