使用 js 添加脚本标记
最编程
2024-03-04 15:58:04
...
var secScript = document.createElement("script");
secScript.setAttribute("type", "text/javascript");
secScript.setAttribute("src", "https://xxx.xxxxxx.com/xxxxxxxx.js");
document.body.insertBefore(secScript, document.body.lastChild);
上一篇: 脚本标记和访问 HTML 网页的详细介绍
下一篇: 脚本标签 charset 属性的使用说明