1.介绍Jquery
2.简介
3.新建一个静态项目,并粘贴jquery库
4.程序
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(function(){
$("button").click(function(){
alert("click no me");
})
})
</script>
</head>
<body>
<button>click me</button>
</body>
</html>
5.效果
6.程序二
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(function(){
$("button").click(function(){
//
<!--alert("click no me");-->
alert($(this).text())
})
})
</script>
</head>
<body>
<button>click me</button>
</body>
</html>
7.效果运行