更新时间:2023-11-20 22:44:10
当然 - 你可以创建一个新脚本元素并将其附加到头部。
var script = document.createElement('script');
script.src = 'url-to-plugin';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
如果这不起作用,可以尝试此页面,使用 setAttribute 的方法略有不同。
If this doesn't work, maybe try the method on this page, it's a slightly different approach using setAttribute.