通过控制台在没有它的页面上加载 jQuery

有时必须使用不使用 jQuery 的页面,而大多数开发人员习惯使用 jQuery

在这种情况下,可以使用 Chrome Developer Tools console( F12 )通过运行以下命令在加载的页面上手动添加 jQuery

var j = document.createElement('script');
j.onload = function(){ jQuery.noConflict(); };
j.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(j);

你想要的版本可能与上面的版本不同(1.12.4)你可以在此处获得所需的链接。