로컬 그림의 존재 여부를 판단하다
2413 단어 그림
1 $(function(){
2 //
3 var nopic="__CDN_PATH_1__/public/kn/Plan/images/base_plan.png";
4 $("img").each(function(){
5 var img = $(this);
6 if(document.all && img.fileSize == -1){
7 $(this).attr("src", nopic);
8 }else{
9 //
10 if($(img).width() > 110){
11 $(img).error(function(){
12 $(this).attr("src", nopic);
13 });
14 }
15 }
16 });
17 });