Код кода копирования следующим образом:
var xmlhttp;
Функция createxmlhttprequest ()
{{
if (window.xmlhttprequest)
{{
xmlhttp = new xmlhttprequest ();
if (xmlhttp.overridemimeType)
{{
xmlhttp.overridemimeType ("text/xml");
}
}
иначе if (window.activexobject)
{{
пытаться
{{
xmlhttp = new ActivexObject ("msxml2.xmlhttp");
}
поймать (e)
{{
xmlhttp = new ActivexObject ("microsoft.xmlhttp");
}
}
if (! xmlhttp)
{{
Window.alert («Ваш браузер не поддерживает создание объектов xmlhttprequest»);
}
Вернуть xmlhttp;
}