let script = document.createElement('script');
script.src="https://code.jquery.com/jquery-3.2.1.min.js";
script.integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=";
script.crossorigin="anonymous";
document.head.appendChild(script);以上为引入jQuery的代码,大家一起学习
经过多次尝试,确认以上代码会报错CORS,修改一下
let script = document.createElement('script');
script.src="https://code.jquery.com/jquery-3.2.1.min.js";
document.head.appendChild(script);
snippets:载入一些库
Snippets 注入jquery

Snippets 注入jquery

使用Snippets来辅助Debuggin步骤:
1)添加文件

2)添加代码JQ库

3)运行

4)切换Networ

5)到Source添加代码

添加辅助库
4-5重新看