Using HTML I could manually put this into the body

```
<img style="display:none;"
onload="Success('test')"
onerror="Fail('test')"
src="http://example.com/test.png"
/>

```

Is there anyway to do this check using jQuery or JavaScript?

Edit: I want to avoid using HTML and inserting image manually. I am trying to accomplish the check using just jQuery/JS.