다음과 같이 코드 코드를 복사하십시오.
var xmlhttp;
함수 createxmlhttprequest ()
{{
if (window.xmlhttprequest)
{{
xmlhttp = new xmlhttprequest ();
if (xmlhttp.overridemimeType)
{{
xmlhttp.overRidemImeType ( "Text/XML");
}
}
else if (window.activexObject)
{{
노력하다
{{
xmlhttp = new ActiveXobject ( "msxml2.xmlhttp");
}
캐치 (e)
{{
xmlhttp = new ActiveXobject ( "microsoft.xmlhttp");
}
}
if (! xmlhttp)
{{
window.alert ( "브라우저는 xmlhttprequest 객체의 생성을 지원하지 않습니다");
}
XMLHTTP를 반환합니다.
}