//Selects all links which have href='http://google.com' document.querySelectorAll("a[href='http://google.com']");
document.getElementById("link")[0].getAttribute("href");