Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Why do we add 'return false' to an onclick event in JavaScript?

danielm77danielm77 USAMember Posts: 72

Can someone please explain me what is the functionality of the 'return false' code segment in an onclick event of a JavaScript?



  • DavidMDavidM USAMember Posts: 342

    It usually cancels the "default" behavior of the applied component, For links, clicking is disabled.

Sign In or Register to comment.