jMeter doesn't evaluate the HTML or JavaScript that is returned by the webserver, it just captures it.
So, no, you can't do an onClick event with jMeter. What you can do however is extract the url that the onClick event would trigger using the Regular Expression Extractor
, and then feed that url to a new HTTP Sampler.