How to call a java script function by fire dropdownlist on selectedindex change event

from the pageload
-------------------------------------------------------------------------------------------------------------
 dropdownList.Attributes.Add("onChange", "return OnSelectedIndexChange();");

Inside javascript
--------------------------------------------------------------------------------------------------------------
   function OnSelectedIndexChange()
     {
         
      }