摘要:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&
<!DOCTYPE html>
<html lang="en">
<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>Document</title>
<script src="static/js/jquery-3.3.1.min.js"></script>
<style>
#box{width:500px;height:500px;background:pink;}
</style>
</head>
<body>
<script>
$(document).ready(function () {
//jQ开头必须带$,可以使用CSS的选择器,如class,id
//jqdocReady vscode JQ插件支持的缩写
$("#box").hide();
// alert("hello Jquery!");
// $("#box").show();
$("button").click(function (e) {
$("#box").show();
});
});
$(function () {
});
</script>
<div id="box"></div>
<button>点击</button>
</body>
</html>
批改老师:天蓬老师批改时间:2019-01-14 09:52:21
老师总结:jQuery基本语法, 主是要选择器的链式操作, 还有事件, 这个案例中都有体现