Javascript get anchor href on click
- by Infinity
Hello guys!
How can I get the href of an anchor when I click on it using javascript?
I did the following:
document.onClick = myFunc();
function myFunc() {
}
But how to extend the function to respond only to clicks on anchors and get the href?