Radio.onFocus()

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

onFocus="command"

Description

The onFocus event handler of the Radio object is an event handler that notifies you when the focus is set on the radio button.

Example

In Listing 7.441, the onFocus event handler notifies the user with a text message when the focus is set on the radio button.

Listing 7.441 Example of the onFocus Event Handler
 <html> <head> <title> Example of the radio onFocus event handler</title> </head> <body> <script language="JavaScript"> <!--Hide // function sets the focus to box 1 function showFocus(){ document.form1.text1.value = "Focus set on Box 1"; } // End Hide ---> </script> <form name="form1"> Click on the radio button <br><br> <input ...

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.