摘要:<!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>點(diǎn)擊</button>
</body>
</html>
批改老師:天蓬老師批改時(shí)間:2019-01-14 09:52:21
老師總結(jié):jQuery基本語法, 主是要選擇器的鏈?zhǔn)讲僮? 還有事件, 這個(gè)案例中都有體現(xiàn)