get href attribute javascript code example
Example 1: get href attribute javascript
document.getElementById("link")[0].getAttribute("href");
Example 2: javascript find all href with same value
//Selects all links which have href='http://google.com'
document.querySelectorAll("a[href='http://google.com']");
Example 3: get attribute href
document.find_element_by_xpath("//example").getAttribute('href')