I have a page with the following code:
<a id="test" href="someurl" onclick="somefunction">link</a>
I need to actually read the 'onclick' data. As such, I would like something to the effect of
alert(document.getElementById('test').onClick)
Sadly, it returns undefined
. What do I need to do to get somefunction
?