在jQuery中,当您处理click事件时, 返回false可阻止链接以通常的方式响应
阻止发生默认操作(访问
href属性):
$('a.someclass').click(function(e){ // Special stuff to do when this link is clicked... // Cancel the default action e.preventDefault();});
在jQuery中,当您处理click事件时, 返回false可阻止链接以通常的方式响应
阻止发生默认操作(访问
href属性):
$('a.someclass').click(function(e){ // Special stuff to do when this link is clicked... // Cancel the default action e.preventDefault();});