August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onFocus="command"
The onFocus event handler of the Password object is used to handle the Focus event for the password box.
Listing 7.421 shows an example of the onFocus event handler.
<html>
<head>
<title> Example of the password onFocus event handler</title>
</head>
<body>
<script language="JavaScript">
<!--Hide
// sets a message in the text box
function set(){
document.form1.pass.value="aha123";
}
// End Hide --->
</script>
<form name="form1">
<input type="PASSWORD" Name="pass" size=10 onFocus=set()>
<br>
<input type="BUTTON" value="Show Formname" >
</form>
</body>
</html>
|
Read now
Unlock full access