TextField get Focus and clear content : TextField « Form Control « JavaScript DHTML
- JavaScript DHTML
- Form Control
- TextField
TextField get Focus and clear content
<html>
<head>
<title>Clear Form Demo</title>
<script language="javascript">
<!--
function ClearForm() {
document.testform.email.value= "";
}
//-->
</script>
</head>
<body>
<form name="testform">
<input type="text" name="email" value="Something here." onfocus="ClearForm();">
</form>
</body>
</html>
Related examples in the same category