画像切れを隠す
画像がない場合、「x」がでると見た目上よろしくありません。
これを防ぐには、imgタグのonErrorでイベントを拾って隠してしまえばよいです。
<html> <head> </head> <body> <img src="http://red.hatena.ne.jp/images/ad/42_banner.jpg" id="image_ok" onError="imageEvent(this)"> <img src="http://red.hatena.ne.jp/images/ad/xxxxxxxxx.jpg" id="image_ng" onError="imageEvent(this)"> 画像がなければこの文字は左詰めされます。 <script language="javascript"> <!-- function imageEvent(img) { img.width=0; img.height=0; } //--> </script> </body> </html>