Why does return false
prevail over, for example, a href?
We have this code as an example:
<!DOCTYPE html>
<html>
<head>
<title>Uma página linda</title>
</head>
<body>
<a href="http://stackoverflow.com/" onclick="return false;" title="Link pra stackoverflow" target="_blank">Melhor site de todos (Stackoverflow)</a>
</body>
</html>
When clicked, in this case, nothing would happen, due to return false
.
But why this?
Why does clicking the link the site targeting event does not "work"?