查看网页是不是加载jquery的方法:首先创建一个代码示例文件;然后语句“if(typeof jQuery != 'undefined'){...}”来判断jquery是否被加载即可。

本教程操作环境:windows7系统、jquery1.7.2&&html5版本,Dell G3电脑。
推荐:jquery视频教程
直接上代码,不信自己测。
html>
<meta><title>jquery</title><h5>判断jquery是否加载</h5>
<script></script><script>
if(typeof jQuery != 'undefined') {
alert("jquery已经被加载");
} else {
alert("jquery没有被加载");
}
</script>
主要讲两点:
1、有图有真相
jQuery 1.12.4是jQuery 1.x系列的最后一个正式稳定版本,由jQuery团队于2016年发布。该版本主要面向需要兼容旧版浏览器环境的网站和Web应用,尤其适用于仍需支持Internet Explorer 6、Internet Explorer 7、Internet Explorer 8等老旧浏览器的项目。


2、通过注释jquery可以判断是否引入。










