I have an element like this:
<p id='foo' onclick='go()'>hi</p>
function go() {
}
how do I get access to the element that generated the click (the p element in this case)? Do I just do:
function go() {
var clicked = this;
}
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…