代码
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="js/jquery.js"></script>
<style>
div{
width: 200px;
height: 200px;
background-color: aqua;
}
</style>
</head>
<body>
<div>
<p>我是源元素</p>
</div>
<script>
$(function(){
$("div").on("click",function(){
$("div p:first-child")
.clone()
.text("我是克隆体")
.appendTo($("div p:first-child"));
$("div").off("click");
});
});
</script>
</body>
</html>
效果