浏览器console中加入jquery方便调试

var jquery = document.createElement('script');  
jquery.src = "http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js";//若调试页面是https的这里也修改为https.
document.getElementsByTagName('head')[0].appendChild(jquery);  
jQuery.noConflict();


这个节点就是我们动态生成的 script 节点.然后把百度上的jquery 地址赋给 jquery 节点.在 head 节点下插入jquery 节点即可.
回车,然后就可以使用jquery的选择器等很方便的操作调试了。

  

posted on 2019-07-12 12:11  隨風.NET  阅读(813)  评论(0编辑  收藏  举报

导航