Posted on 2011-09-20
I'm capturing a localStorage variable that contains a previously entered email address from another page. Upon the entry of this page I want to show the email address as the 'default' value in the text box.
I need to know the syntax of value=variable in the input statement. Here is the HTML code:
var tmpEMAdd = localStorage.EMAdd;
<input type="text" id="txtsea" size=50 value=tmpEMAdd autofocus/><br />
<input type="button" value=" Save " onClick="setValue()"/>