I think I have a pretty good image of what JavaScript can do now. It's THE tool for actively updating HTML/CSS code in real-time for a web visitor amongst other things (animation, website layout, etc.).
But I put this into my code:
HTML:
Code:
<form id="emailbox" name="form1" method="post" action="">
<div>
<input type="text" name="go" id="go" value="your e-mail" onclick="removeText()"/>
<input type="submit" value="Join" />
</div>
</form>
JS:
Code:
function removeText(){
var form = document.getElementById['emailbox'];
var name = form.elements['go'].value;
}
Now that I have a variable, name, for the value of the value attribute, what function can I use to change the value attribute to blank? I'm still having trouble here.
Bookmarks