Removing the href attribute
问题 I'm trying to write a code for pagination. One function is to disable the current link so it looks like text and to be unclickable. In html page this could be achieved by omitting the href attribute like : <a>Link</a> I couldn't do that in javaScript, AvdonPagination.prototype.manageLinks = function(link){ if(link){ this.current.href = '#'; this.current = link; }else{ this.current = this.links[0]; } this.current.href = null; } because this.current.href = null; produces <a href="null">Link</a>