We would like to know how to clear input textbox value on load.
<!DOCTYPE html>
<html>
<body>
<script>
window.onload = function(){<!-- w ww . ja v a2 s. c o m-->
document.getElementById("user").value = "";
}
</script>
<form method="POST" action="">
<input name="username" id="user" value="test" /><br />
<input name="pwd" id="pass" value="test" />
<input type="submit" value="Go" />
</form>
</body>
</html>
The code above is rendered as follows: