The onFocus event Handler : StatusBar « Window Browser « JavaScript DHTML






The onFocus event Handler


<HTML>
<HEAD>
<TITLE>Elements Array</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function prompt(msg) {
    window.status = "Please enter your " + msg + "."
}
</SCRIPT>
</HEAD>
<BODY>
<FORM>
Enter your first name:<INPUT TYPE="text" NAME="firstName" 
onFocus="prompt('first name')"><P>
Enter your last name:<INPUT TYPE="text" NAME="lastName" 
onFocus="prompt('last name')"><P>
Enter your address:<INPUT TYPE="text" NAME="address" 
onFocus="prompt('address')"><P>
Enter your city:<INPUT TYPE="text" NAME="city" onFocus="prompt('city')"><P>
</FORM>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Date in the status bar
2.Displays the time in the status line
3.Write text to the window's status bar
4.Using the self Property in status bar
5.Setting the Default Status Message
6.Links with Custom Statusbar Messages
7.Handling Status Message Changes
8.JavaScript display infomation in Status Bar
9.Working with Status Bar Messages
10.Using Status Messages
11.Scrolling Text in the Status Window
12. Creating a Scrolling Banner in status bar