Password.blur()

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							password.blur()

Description

The blur method for the Password object is used to remove the focus from the password box.

Example

Listing 7.414 shows an example of how the focus is removed from the password box.

Listing 7.414 Example of the blur() Method
<html>
<head>
<title> Example of the blur method of the password object</title>
</head>
<body>

<script language="JavaScript">
<!--Hide
// function that shifts focus when the button is clicked
function shift(){
     document.form1.pass.blur();
     document.form1.txt.value="Get Focus";
}
// End Hide --->
</script>
							 <form name="form1"> <input type="PASSWORD" Name="pass" size=10> <br> <input type="Text" name="txt" size=10> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.