怎么看网页是不是加载jquery-LMLPHP

本教程操作环境:windows7系统、jquery1.7.2&&html5版本,Dell G3电脑。

推荐:jquery视频教程

直接上代码,不信自己测。

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jquery</title>
</head>
<body>
<h5>判断jquery是否加载</h5>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
if(typeof jQuery != 'undefined') {
alert("jquery已经被加载");
} else {
alert("jquery没有被加载");
}
</script>
</body>
</html>
登录后复制

主要讲两点:

1、有图有真相

怎么看网页是不是加载jquery-LMLPHP

怎么看网页是不是加载jquery-LMLPHP

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

以上就是怎么看网页是不是加载jquery的详细内容,更多请关注Work网其它相关文章!

09-13 16:52