I know this is bad practice. Don\'t write code like this if at all possible.
Of course, we\'ll always find ourselves in situations where a clever snippet of inline
You've got it nearly correct, but you haven't accounted for the this value supplied to the inline code.
this
Click Me
is actually closer to:
Inline event handlers set this equal to the target of the event. You can also use anonymous function in inline script