var importJs=document.createElement('script');
importJs.setAttribute("type","text/javascript");
importJs.setAttribute("src", 'https://code.jquery.com/jquery-1.12.4.min.js');
document.getElementsByTagName("head")[0].appendChild(importJs);

使用Chrome控制台调试页面时,如果页面没有使用jQuery调试起来不方便,我们可以在控制台给页面动态引入jQuery方便调试

posted on 2021-12-15 09:10  EEEEEEEEEEEEEEEEEEE  阅读(339)  评论(0编辑  收藏  举报