<html>
<head>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").add("<br><span>一个新的 span 元素。</span>").appendTo("p");
});
});
</script>
</head>
<body>
<button>添加一个 span 元素</button>
<p>一个 p 元素。</p>
</body>
</html>