You are here: irt.org | FAQ | JavaScript | Image | Q1026 [ previous next ]
One way:
<SCRIPT LANGUAGE="JavaScript"><!-- if (document.images) document.write('<IMG SRC="javascriptenabled.gif" WIDTH="100" HEIGHT="100">'); else document.write('<IMG SRC="javascriptdisabled.gif" WIDTH="100" HEIGHT="100">'); //--></SCRIPT> <NOSCRIPT> <IMG SRC="javascriptdisabled.gif" WIDTH="100" HEIGHT="100"> </NOSCRIPT>
Alternatively:
<IMG NAME="myImage" SRC="javascriptdisabled.gif" WIDTH="100" HEIGHT="100"> <SCRIPT LANGUAGE="JavaScript"><!-- if (document.images) document.images.myImage.src = 'javascriptenabled.gif'; //--></SCRIPT>