<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>jQuery的基础语法</title>
<script type="text/javascript" src="jQuery.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<script type="text/javascript">
//放入js代码,或者jQuery代码
//文档就绪函数
//基本格式:$(选择器).action(),选择一个标签、进行相应的操作动作
$(document).ready(function(){
//jQuery代码
$str="欢迎来到jQuery的学习";
alert($str);
$("div").hide();
$("button").click(function(){
$("div").show();
})
})
</script>
<div style="width:100px;height:100px;background:pink;"></div>
<button>点击</button>
</body>
</html>