<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
body {
font-size: 13px;
}
.clsShow {
border: 1px solid #CCCCCC;
background-color: #EEEEEE;
margin-top: 15px;
padding: 5px;
width: 220px;
line-height: 1.8em;
display: none;
}
.btn {
border: 1px solid #666666;
padding: 2px;
width: 50px;
}
</style>
<script src="../js/jquery-3.5.1.js"></script>
<script>
$(function () {
var intI = 0;
$("body,div,#btnShow").click(function () {
intI++;
$(".clsShow").show("normal")
.html("你好,欢迎来到JQuery的世界!")
.append("<div>执行次数<b>"+ intI +"</b></div>");
});
});
</script>
</head>
<body>
<div>
<input type="button" id="btnShow" class="btn" value="点击">
</div>
<div class="clsShow"></div>
</body>
</html>