首先,确保在HTML文档中引入了jQuery库。可以通过以下方式在<head>
标签中引入jQuery库:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
接下来,我们可以使用jQuery的append()
方法向<body>
首先,确保在HTML文档中引入了jQuery库。可以通过以下方式在<head>
标签中引入jQuery库:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
接下来,我们可以使用jQuery的append()
方法向<body>