在html页面中引入jQuery的js文件即可
<!-- 相对路径 -->
<scripttype="text/javascript"src="./res/jquery-1.11.3.min.js"></script>
jQuery 在页面加载完成时执行
$(document).ready(function(){
//statement
})
// 或者
$(function(){
//statement
})
<!DOCTYPE html>
<htmllang="en">
<head>
<metacharset="UTF-8">
<title>Title</title>
<scripttype="text/javascript"src="./res/jquery-1.11.3.min.js"></script>
</head>
<body>
<scripttype="text/javascript">
//匿名函数
// function myfunc(){
// alert('====')
// }
//jquery的专用符号
$(document).ready(function(){
alert('====')
})
$(function(){
alert('=======')
console.log("=========================")
})
</script>
</body>
</html>