Reset.handleEvent() : Reset « Form « JavaScript Tutorial

Home
JavaScript Tutorial
1.Language Basics
2.Operators
3.Statement
4.Development
5.Number Data Type
6.String
7.Function
8.Global
9.Math
10.Form
11.Array
12.Date
13.Dialogs
14.Document
15.Event
16.Location
17.Navigator
18.Screen
19.Window
20.History
21.HTML Tags
22.Style
23.DOM Node
24.Drag Drop
25.Object Oriented
26.Regular Expressions
27.XML
28.GUI Components
29.Dojo toolkit
30.jQuery
31.Animation
32.MS JScript
JavaScript Tutorial » Form » Reset 
10.25.6.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>
10.25.Reset
10.25.1.Reset
10.25.2.Reset.blur()
10.25.3.Reset.click()
10.25.4.Reset.focus()
10.25.5.Reset.form
10.25.6.Reset.handleEvent()
10.25.7.Reset.name
10.25.8.Reset.onBlur
10.25.9.Reset.onClick
10.25.10.Reset.onFocus
10.25.11.Reset.type
10.25.12.Reset.value
10.25.13.Resetting a form on page load
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.