<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="jquery-1.11.1.js"></script>
<script>
console.log($);
console.log(jQuery);
console.log($===jQuery);
// jQuery("");
jQuery(document).ready(function () {
alert(1);
});
</script>
</head>
<body>
</body>
</html>三次打印结果如下:
本文通过一个简单的HTML页面展示了如何引入jQuery库,并利用console.log()函数验证了$符号是否成功指向了jQuery库。此外,还演示了如何使用jQuery来触发页面加载完成后的回调函数。
1045

被折叠的 条评论
为什么被折叠?



