).
JavaScript code:
$(function(){$(".phpernote_content img").each(function(){if(this.fileSize<=0){this.src="http://www.phpernote.com/images/load_fail.png";}});});
Some html code:
<Div class = "phpernote_content"> <div> </div> <div class = "videoTitle"> php tutorial </div> <div class = "phpernote_content"> <div> </div> <div class = "videoTitle"> javascript tutorial </div>
Articles you may be interested in
- Js checks whether the image is loaded and obtains the image width.
- Js determines whether the image has been loaded
- JavaScript and Jquery dynamically load Js files and Css files
- Jquery checks whether the page has been loaded with the jquery File
- Image zoom-in display special effects slimbox the most lightweight function the most powerful Jquery Image zoom-in special effects
- Php retrieves and outputs a list Of all images in the content
- Php retrieves remote images and downloads and saves them to a local device.
- Powerful PHP image processing class (watermark, transparency, zoom, sharpen, rotate, flip, cut, reversed)