设置点击鼠标时不跳转
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>点击不跳转</title>
</head>
<body>
<!--<a href="javascript:view(0)">hello</a>//href="javascript:f1()"不跳转-->
<!--<a href="javascript:f1()">yes</a> //点击a标签作用相当于onclick,执行f1()函数-->
<div onclick="func()"></div>
</body>
<script>
function f1() {
alert(111);
}
</script>
</html>