摘要:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style type="text/css">div{width:100px;height:100px;background-col
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
div{width:100px;height:100px;background-color: blue;}
</style>
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$str="2222";
// alert($str);
$("#x").click(function(){
$("div").show();
})
$("#y").click(function(){
$("div").hide();
})
})
</script>
</head>
<body>
<div></div>
<button id="x">显示</button>
<button id="y">隐藏</button>
</body>
</html>
批改老师:天蓬老师批改时间:2019-01-19 19:05:31
老师总结:<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
js脚本,应该尽可能放在html底部,这样可以防止阻塞