美文网首页
动态加载js

动态加载js

作者: 尼洛1994 | 来源:发表于2021-02-02 14:51 被阅读0次
function addScript(url) {
    var script = document.createElement('script');
    script.type = 'application/javascript';
    script.src = url;
    document.head.appendChild(script);
}
addScript('https://raw.githack.com/eKoopmans/html2pdf/master/dist/html2pdf.bundle.js');

相关文章

网友评论

      本文标题:动态加载js

      本文链接:https://www.haomeiwen.com/subject/ciznettx.html