crm动态加载js库

2020-12-13 16:38

阅读:603

标签:crm动态加载js库   crm2011   crm   

function load_script(url) {
    var xmlHTTPRequest;
    if (window.ActiveXObject) {
        xmlHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlHTTPRequest = new XMLHttpRequest();
    }
    else {
        xmlHTTPRequest = new ActiveXObject("Msxml2.XMLHTTP");
    }
    xmlHTTPRequest.open(‘GET‘, url, false);
    xmlHTTPRequest.send(‘‘);
    eval(xmlHTTPRequest.responseText);
    var s = xmlHTTPRequest.responseText.split(/\n/);
    var r = /^(?:function|var)\s*([a-zA-Z_]+)/i;
    for (var i = 0; i         var m = r.exec(s[i]);
        if (m != null) {
            window[m[1]] = eval(m[1]);
        }
    }
}
//事例
load_script("/WebResources/new_rest");

crm动态加载js库,搜素材,soscw.com

crm动态加载js库

标签:crm动态加载js库   crm2011   crm   

原文地址:http://blog.csdn.net/y_f123/article/details/32707549


评论


亲,登录后才可以留言!