FileUpload.onFocus

JavaScript 1.1+ Nav3+, Opera3+ Syntax

onFocus="command"

Description

The onFocus event handler of the FileUpload object notifies you when the focus is set on the upload box.

Example

In Listing 7.249, the onFocus event handler is used to notify the user when the focus is moved to the upload box. If the user sets the focus to the FileUpload box, a message is displayed. If the user removes the focus from the FileUpload box, another message is displayed.

Listing 7.249 Example of the onFocus Event Handler
 <html> <head> <title>Using the onFocus event handler</title> </head> <body> <script language="JavaScript"> <!-- Hide // function that displays a message whenever focus is set on the FileUpload // box. function showMsg1(){ ...

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.