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 USAPosts: 72Member

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



  • DavidMDavidM USAPosts: 342Member

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

Sign In or Register to comment.