Radio.handleEvent() : Radio Button : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Radio Button »

 

Radio.handleEvent()









Syntax








radio.handleEvent(event)



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












<html>
    <head>
    <title> Example of the radio handleEvent method</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    document.captureEvents(Event.CLICK);

    function handleClick(evnt){
        window.document.but1.handleEvent(evnt);
    }
    function showMsg(){
        alert("Button clicked.");
    }
    document.onclick = handleClick;
    -->
    </script>
    <form name="form1">
    <input type="radio" name="but1" onClick='showMsg()'>Choice 1
    <br>
    <input type="radio" name="but1" onClick='showMsg()'>Choice 2
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Radio Button