动态加载

动态加载Fundebug插件可以这样实现:

<script type="text/javascript">

function loadScript(url, apikey) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src = url;
    script.setAttribute("apikey", apikey);
    document.body.appendChild(script);
}

loadScript("https://og6593g2z.qnssl.com/fundebug.0.3.3.min.js", "API-KEY")
</script>

注意,apikey需要使用setAttribute方法进行配置。

results matching ""

    No results matching ""