<html>
<head>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js"></script>
</head>
<body>
<h2>通过查询选择器查找 HTML 元素</h2>
<p class="intro">Hello World!</p>
<p class="intro">Hello Sweden!</p>
<p class="intro">Hello Japan!</p>
<p id="demo"></p>
<script>
$(document).ready(function() {
var myElements = $("p.intro");
$("#demo").text("第一段 class='intro' 是:" + myElements[0].innerHTML);
});
</script>
</body>
</html>