javascriptonclick

how to prevent onclick event to trigger in select option


I have a select that triggers an event when it is clicked. But I want to prevent it to trigger again when I click in the respective option.

Is there a way to do that?


Solution

  • How about you try using onchange. So if there is not change in what is selected. Nothing is triggered.