欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

javascript創(chuàng)建createXmlHttpRequest對象示例代碼

 更新時間:2014年02月10日 09:22:59   作者:  
這篇文章主要介紹了javascript創(chuàng)建createXmlHttpRequest對象的示例代碼。需要的朋友可以過來參考下,希望對大家有所幫助
復(fù)制代碼 代碼如下:

 var xmlHttp;

    function createXmlHttpRequest()
    {
        if(window.XMLHttpRequest)
        {
            xmlHttp=new XMLHttpRequest();

            if(xmlHttp.overrideMimeType)
                {
                    xmlHttp.overrideMimeType("text/xml");
                }
        }
        else if(window.ActiveXObject)
        {
            try
            {
                xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");  
            }
            catch(e)
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");  
            }
        }
        if(!xmlHttp)
        {
            window.alert("你的瀏覽器不支持創(chuàng)建XMLhttpRequest對象");
        }
        return xmlHttp;
    }

相關(guān)文章

最新評論