<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("img").error(function(){
$("img").replaceWith("<p><b>图片未加载!</b></p>");
});
});
</script>
</head>
<body>
<img src="errorimg.gif" />
<p>如果上面的图像没有正确地加载,会被替换为一段 "图片未加载" 的文本。</p>
</body>
</html>