Javascript ~ img check if no image

<img src="img/xxx.png" onerror="alert('no image at img/xxxx.png !!!!')" />

if there is no image at img/xxx.png

will alert no image at img/xxxx.png !!!!

沒有留言:

發佈留言