<a onclick ="foo()" href="bar.html" >Link </a>

<script>

...
function foo(){
  //I want to know the href property of whoever called me.
  //something like this.caller.href ??
}

</script>

I guess I could just assign all element IDs and then pass my own ID to the JS method I'm calling, but I was looking for a better way.

Edit
Report