
//请求ajax
var xmlHttp_submit;


function ajaxRequest_submit(url,restext,sendcontent) {
		if(window.ActiveXObject){
			try{
				xmlHttp_submit = new ActiveXObject("Microsoft.xmlHttp");	
			}catch(e){
				xmlHttp_submit = new ActiveXObject("Msxml2.xmlHttp");	
			}
		}else if(window.xmlHttpRequest){
			xmlHttp_submit = new xmlHttpRequest();
		}	   
		if (xmlHttp_submit) {
			xmlHttp_submit.open("post", url, false);
			xmlHttp_submit.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			xmlHttp_submit.onreadystatechange = showChanged_submit;
			xmlHttp_submit.send(sendcontent);
		}

		 function showChanged_submit(){
            // 判断状态，4是已发送，200已完成 
			if(xmlHttp_submit.readyState == 4){
				if(xmlHttp_submit.status == 200){
					var resptext = xmlHttp_submit.responseText;
					restext.innerHTML=resptext;
				}else{
					alert("请求出现异常!");
				}
			}
     	 }
}