点击a标签不跳转的办法

方法1:

<a href="http://www.baidu.com" onclick="return false"></a>

方法2:

<a href="javascript:void(0);"></a>

方法3:(总是跳转到当前页面顶部,当页面内容较多时,还是会有跳转的感觉)

<a href="#"></a>

注:

好像还可以直接不写href属性

参考:http://blog.csdn.net/zhouyong0/article/details/6457170

http://blog.csdn.net/wxl1555/article/details/53897841

原文地址:https://www.cnblogs.com/ooo0/p/7657593.html