Select.handleEvent() : Select : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Select »

 

Select.handleEvent()









Syntax








select.handleEvent(event)



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












<html>
    <head>
    <script language="JavaScript1.2">
    <!--
    var counter = 0;

    window.captureEvents(Event.CLICK)
    window.onClick = myClickHandler;

    function myClickHandler{
      window.document.myForm.mySelect.handleEvent;
    }
    function changeSelect(){
      if(counter > 3){
        counter = 0;
        document.myForm.mySelect.selectedIndex = counter;
      }else{
        document.myForm.mySelect.selectedIndex = counter++;
      }
    }
    -->
    </script>
    </head>
    <body>
    <form name="myForm">
      <select name="mySelect" onClick='changeSelect()'>
        <option value=A>AA</option>
        <option value=B>BB</option>
        <option value=C>CC</option>
        <option value=D>DD</option>
      </select>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Select