<html>
<body>
<IMG src=" http://www.chcode.net/images/chcode.gif" alt="图片来源正常"></p>
<IMG src="abc.gif">
</body>
</html>
<script language="javascript">
var AllImages=document.getElementssByTagName("IMG");
for(i=0;i<AllImages.length;i++)
{
var img=AllImages[i];
img.οnerrοr=function()
{
this.src=" http://www.chcode.net/images/chcode.gif";
this.alt="图片来源错误";
}
}
</script>
<body>
<IMG src=" http://www.chcode.net/images/chcode.gif" alt="图片来源正常"></p>
<IMG src="abc.gif">
</body>
</html>
<script language="javascript">
var AllImages=document.getElementssByTagName("IMG");
for(i=0;i<AllImages.length;i++)
{
var img=AllImages[i];
img.οnerrοr=function()
{
this.src=" http://www.chcode.net/images/chcode.gif";
this.alt="图片来源错误";
}
}
</script>