动态插入script标签
2018-11-22 本文已影响0人
橘子柚子橙子_
// 动态插入jquery
let responseHtml = '<scr'+'ipt></scr'+'ipt>';
responseHtml = responseHtml.replace(/<\/?sc[^\>]+>/g,'')
let ele = document.createElement("script");
ele.src = "https://code.jquery.com/jquery-3.3.1.min.js";
ele.innerHTML = responseHtml;
document.body.appendChild(ele);