让A超链接无效的办法 阻止元素发生默认的行为


$("a").click(function(event){
  event.preventDefault();
});
event.preventDefault();

方法阻止元素发生默认的行为(例如,当点击提交按钮时阻止对表单的提交)。

原文地址:https://www.cnblogs.com/william-lin/p/3523027.html