To get local href value from anchor (a) tag with JavaScript, we use the href
property.
For instance, we write
const href = document.getElementById("aaa").href;
to select the link with ID aaa
with getElementById
.
And then we get its href attribute value with the href
property.