$(x).append(y)方法:在每个所选择的元素x内部的末尾处插入内容y
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/jquery-3.3.1.js"></script>
</head>
<body>
<p id="content">I love </p>
<script>
$("#content").append("<span>you.</span>");
</script>
</body>
</html>
结果:I love you.
$(x).appendTo(y)方法:将每个所选择的元素x插入到指定元素y内部的末尾处
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/jquery-3.3.1.js"></script>
</head>
<body>
<p id="content">I love </p>
<span id="letters">you.</span>
<script>
$("#letters").appendTo("#content");
</script>
</body>
</html>
结果:I love you.