var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET", JSON.parse(res).mp3, false);
xmlhttp.send();
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) alert("Exist");
else if (xmlhttp.status == 404) alert("Doesn't exist");
else alert("Don't know");
}
new ActiveXObject("Microsoft.XMLHTTP");改成new XMLHttpRequest();
大哥,ActiveXObject是IE5.6的写法
所有现代浏览器 (IE7+、Firefox、Chrome、Safari 以及 Opera) 都内建了 XMLHttpRequest 对象