Form JavaScript Tutorial

Syntax

onFocus="command"
The onFocus event handler is defined in an tag and specifies what to do when the button gains focus.


    
                   value="Big Button"
             name="myButton"
             onFocus="alert('Focus event occured')">