如何在console控制台导入jquery

栏目: jQuery · 发布时间: 6年前

内容简介:===

=

=

=

/*

百度共用jquery包

http://apps.bdimg.com/libs/jquery/1.6.4/jquery.js

http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js

http://apps.bdimg.com/libs/jquery/2.1.1/jquery.js

http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js

*/

//文章来源:https://blog.csdn.net/aigochina/article/details/78864647

//在console引入jquery,以方便使用。

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

=

=

=


以上所述就是小编给大家介绍的《如何在console控制台导入jquery》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Cracking the Coding Interview

Cracking the Coding Interview

Gayle Laakmann McDowell / CareerCup / 2015-7-1 / USD 39.95

Cracking the Coding Interview, 6th Edition is here to help you through this process, teaching you what you need to know and enabling you to perform at your very best. I've coached and interviewed hund......一起来看看 《Cracking the Coding Interview》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

SHA 加密
SHA 加密

SHA 加密工具