<!DOCTYPE html>标签:function,先后顺序,return,绑定,alert,false,jquery007 From: https://www.cnblogs.com/lfyxys/p/16929349.html
<html lang="en">
<head>
<meta charset="UTF-8">
<title>顺序</title>
</head>
<body style="width: 980px;margin: 0 auto">
<h1>绑定事件先执行,a标签的默认的后执行。</h1>
<h1>如果要让a标签的默认的不执行。return false即可。</h1>
<h1 >例子</h1>
<a onclick="return go()" href="https://baidu.com">出发1</a>
<a id="i1" href="https://baidu.com">出发2</a>
<script src="jquery3.6.1.js"></script>
<script>
function go(){
alert(123);
return true;
// return false;
}
$('#i1').click(function (){
alert(666);
return false;
});
</script>
</body>
</html>