function IsExist(url) {
var xmlhttp;
if (window.ActiveXObject) {
xmlhttp = new ActiveObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
xmlhttp.open("HEAD", url, false)
xmlhttp.send()
return xmlhttp.status == 200
}
var flag = true;
var i = 0;
while (flag) {
i++;
var url = ct + "/userfiles/1/images/"
+ '${page.list[0].pubNum }' + i + '.png';
if (IsExist(url)) {
var lbt = "<img src='" + url+"'/>";
$('.zlft2').append(lbt);
} else {
flag = false;
}
};
判断图片是否存在function IsExist(url) { var xmlhttp; if (window.ActiveXObject) { xmlhttp = new ActiveObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlhttp = new XMLHtt