动态加载JS文件

发布时间:2016-08-04 09:41:10编辑:丝画阁阅读(1174)

    _TBFD.script = document.createElement("script");
    _TBFD.script.type = "text/javascript";
    _TBFD.script.async = true;
    _TBFD.script.charset = "utf-8";
    _TBFD.script.src = (('https:' == document.location.protocol?'https://ssl-static1':'http://static1')+'.bfdcdn.com/service/xxxxx.js');
    document.getElementsByTagName("head")[0].appendChild(_TBFD.script);

关键字