<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>
<div>
<div style="display: inline-block">
<a onclick="Add(this);"><button>+</button></a>
</div>
<div style="display: inline-block">
<input type="checkbox">
<input type="text" value="IP">
</div>
</div>
</div>
<script src="../../jquery-1.12.4.js"></script>
<script>
function Add(self) {
$(self).parentsUntil("outer").clone().find("a").html("<button>-</button>").attr("onclick","Remove(this);").end().eq(1).appendTo(".outer");
}
function Remove(self) {
$(self).parentsUntil("outer").eq(1).remove();
}
</script>
</body>
</html>
如果爱你是错,我不愿对;如果对就是等于离开你,我情愿错一辈子。我知道你很忙,但是你一定要知道:你今天的任务是很重要的,因为你的任务是知道我在想念你。