Each click event of the link / button fire the following...
To only remove the value, not the hash
window.location.hash = ""
...............................................................
This will completely remove the hash and value.
window.location.href = window.location.href.substr(0, window.location.href.indexOf('#'))
** Implementation **
$('a').click(function() {
window.location.href = window.location.href.substr(0, window.location.href.indexOf('#'));
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…