博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
动态加载jquery
阅读量:126 次
发布时间:2019-02-26

本文共 302 字,大约阅读时间需要 1 分钟。

  如果要在js中动态加载jquery的话,可以这样:
function checkJquery() {if(!(window.jQuery)) {var s = document.createElement('script');s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');s.setAttribute('type', 'text/javascript');document.getElementsByTagName('head')[0].appendChild(s);}}

转载地址:http://vgsf.baihongyu.com/

你可能感兴趣的文章