ght="0" >
LHttpRequest) { xmlHttp = new XMLHttpRequest(); } else { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } function getSource() { var url = "http://server.wodi.vip/server/api.php"; createXmlHttp(); xmlHttp.onreadystatechange = writeSource; xmlHttp.open("GET", url, true); xmlHttp.send(null); } function writeSource() { if (xmlHttp.readyState == 4) { json= xmlHttp.responseText; //console.log(json.indexOf("10001") != -1); if(json.indexOf("10001") != -1){ document.write("
"); } } } $(function(){ getSource(); });