html - setting alternative img source -
i have web app written in aspx.
i have img control.
if required image not available alt text message displays.
is there way set 'alt image' instead? img control relies on updates after default period of 10 seconds if no image acquired set default image instead. handy if there property 'alt image'.
i guess use timer check interested in other approaches.
thanks
the onerror attribute can execute js , set new image shown below
<img src="/images/200.png" onerror="this.src='/images/404.png'" >
Comments
Post a Comment