$i=0; do { $i++; $scri = '../img/full_wt/white_'.$i.'.png'; if(file_exists($scri)) { printf(" <img src='".$scri."' id='scrins' /> "); } } while(file_exists($scri));
var image = new Image(); image.onload = function() { alert(true) }; image.onerror = function() { alert(false) }; image.src = mySrc;
$.ajax({ url:scr, type:'HEAD', error: function(){ alert('empty'); }, success: function(){ alert('isset'); } });