在浏览器console中使用jQuery

var jquery = document.createElement('script');  
jquery.src = 'https://code.jquery.com/jquery-3.3.1.min.js';
document.getElementsByTagName('head')[0].appendChild(jquery);
如果网页源代码中没有引入jquery是不能在console中使用jquery的,这是在console中执行这段代码就可以使用jquery了

猜你喜欢

转载自blog.csdn.net/iastro/article/details/80926249