<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javascript" src="./jquery-1.10.1.min.js"></script>
<script>
$(function()
{
var $box1=$(".box1");
var $box2=$("#box2");
var $p=$("<p>我是段落</p>");
$box1.append($p);
console.log($box1);
});
</script>
<div class="box1"></div>
<span></span>
</body>
</html>