Chrome控制台(console)给页面动态引入jQuery方便调试示例

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

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);



评论: 0 | 引用: 0 | 查看次数: 3568
发表评论
登录后再发表评论!