I have an element like this:
hi function go() { }
hi
how do I get access to the element that g
You could pass this as an argument:
this
<p id='foo' onclick='go(this);'>hi</p> function go(clicked) { }
Like this:
<p id='foo' onclick='go(this)'>hi</p> function go(elem) { }