2005-10-13から1日間の記事一覧

画像切れを隠す

画像がない場合、「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)"> </body></html>