How to write onclick or onchange function suite CRM 8?

Hi Team, Now I need to write custom code to validate the start date and End date count based on set a value in Dropdown. I don’t know how to write custom onclik and onchange function in SuiteCrm version 8. If anyone knows please give me the Instruction.