var xmlHttp; function createXMLHttpRequest(){ if(window.ActiveXObject){ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest){ xmlHttp = new XMLHttpRequest(); } } /////////////////////普通FLY//////////////////////////// //普通FLY function startRequest(){ createXMLHttpRequest(); try{ xmlHttp.onreadystatechange = handleStateChange; xmlHttp.open("GET", "http://www.ufotown.cn/page/Cache/cache/FilterWords.html", true); xmlHttp.setRequestHeader("If-Modified-Since","0"); //禁止读取缓存(每次都发起一次请求),没有设置该值则会出现读取缓存的现象。 xmlHttp.send(null); }catch(exception){ alert(exception); } } var submitCount = 0; function handleStateChange(){ var flag = 0; if(xmlHttp.readyState == 4){ if (xmlHttp.status == 200 || xmlHttp.status == 0){ // 显示返回结果 var arrtext = new Array(); var content = document.frm_phone.fly_msg.value; content = ignoreSpaces(content); content = content.toLowerCase(); var text = xmlHttp.responseText; text = text.substr(0,text.length-1); arrtext = text.split("|"); for(var i=0; i 0){ alert("请求已提交"); return; } submitCount++; requestPhoneProcess(); } } } } //发送FLY function requestPhoneProcess(){ createXMLHttpRequest(); var msg = document.frm_phone.fly_msg.value; var ext = document.frm_phone.fly_ext.value; var img = document.frm_phone.fly_img.value; var starcode = document.frm_phone.starcode.value; var type = ""; var arrFeeType = document.getElementsByName("fly_fee_type"); for(var i=0;i