var importJs=document.createElement('script')  //在页面新建一个script标签
importJs.setAttribute("type","text/javascript")  //给script标签增加type属性
importJs.setAttribute("src", 'https://cdn.bootcss.com/jquery/3.3.1/jquery.js') //给script标签增加src属性, url地址为cdn公共库里的
document.getElementsByTagName("head")[0].appendChild(importJs)//把importJs标签添加在页面

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
猜你喜欢
  • 2021-12-09
  • 2021-07-29
  • 2021-05-24
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
相关资源
相似解决方案