Reset.onFocus : Reset : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Reset »

 

Reset.onFocus







The onFocus event handler is used to specify when the focus is set on the Reset button.












<html>
    <head>
    <title> Example of the reset onFocus event handler</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function setMsg(){
         alert("Focus is set on the reset button.");
    }
    -->
    </script>
    <form name="form1">
    Click the reset button.
    <br><br>
    Enter Name: <input type="text" Name="name" Size=15>
    <br>
    Enter Phone: <input type="text" Name="phone" Size=10>
    <br><br>
    <input type="reset" name=resetbutton value=Reset onFocus='setMsg()'>
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Reset