这个问题看似简单,许多朋友会凭经验设定.disabled=true,结果很不幸运。笔者也曾想搞掉这个超链接的属性,比如移除target,href等(Example:$('a').removeAttr("target");)。经过比较觉得更好的方法应该是:
$("a").click(function(event) {
event.preventDefault();//然后可以重定义自己的链接
var url = this.href + '?id=1';
window.open(url);
});
希望对大家有所帮助。