Reset.handleEvent() : Reset : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Reset »

 

Reset.handleEvent()









Syntax








reset.handleEvent(event)



The handleEvent() method invokes the event handler for the object.












<html>
    <head>
    <title> Example of the reset handleEvent method</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    document.captureEvents(Event.CLICK);
    function handleMyClick(evnt){
        window.document.resetbutton.handleEvent(evnt);
    }
    function showMsg(){
         alert("Form has been reset");
    }
    document.onclick = handleMyClick;
    -->
    </script>
    <form name="form1">
    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" onClick='showMsg()'>
    <br>
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Reset