javascript get href value of link code example Example: get href attribute javascript document.getElementById("link")[0].getAttribute("href");