TextField get Focus and clear content.

Posted on Monday, 24 September 2012 by contact-nizam

<html>
<head>
<title>Clear Form Demo</title>

<script language="javascript">
<!--
function ClearForm() {
  document.testform.password.value= "";

//After focus the password should appear like ****** so include this below code 
//document.testform.password.type="password";
}

//-->
</script>

</head>

<body>

<form name="testform">
    <input type="text" name="password" value="Something here." onfocus="ClearForm();">
</form>
</body>
</html>
       



Reference:
Click here

0 Responses to "TextField get Focus and clear content.":