Void operator (a tag click does not jump)

The void operator has only one purpose, it calculates its operand and returns undefined.
It sounds useless, but it's really useless.
It can force the expression to return undefined.

The URL of the HTMla tag is occasionally used. The effect is that click does not jump

<a href='javascript:void 0' > Do nothing</a>

Guess you like

Origin blog.csdn.net/qq_44977477/article/details/108600316