<a class="a">page</a>
var a = document.querySelector(".a");
function change() {
a.innerHTML = "www.w3s.com";
a.setAttribute("href", "www.w3s.com");
}
a.addEventListener("click", change)
var a = document.querySelector(".a");
function change(e) {
e.preventDefault()
a.innerHTML = "www.w3s.com";
a.setAttribute("href", "www.w3s.com");
a.removeEventListener("click", change);
}
a.addEventListener("click", change)