What's the effect of adding 'return false' to a click event listener?

前端 未结 16 1798
南旧
南旧 2020-11-21 22:59

Many times I\'ve seen links like these in HTML pages:

Click here !
16条回答
  •  Happy的楠姐
    2020-11-21 23:24

    I believe it causes the standard event to not happen.

    In your example the browser will not attempt to go to #.

提交回复
热议问题