我正在尝试编写分页代码。一种功能是禁用当前链接,使其看起来像文本并且不可点击。在 html 页面中,这可以通过省略 href 属性来实现,例如:
<a>Link</a>
我不能在 javaScript 中做到这一点,
AvdonPagination.prototype.manageLinks = function(link){
    if(link){
        this.current.href = '#';
        this.current = link;
    }else{
        this.current = this.links[0];
    }
    this.current.href = null;
}
因为
this.current.href = null;
生产
<a href="null">Link</a>
我也试过this.current.href="", 和this.current.disabled=true,但它们都不起作用。我怎样才能实现<a>Link</a>?