<!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>
我们都渴望白头偕老的爱情,但有时白头偕老却无关爱情。人生最难过的,莫过于你深爱着一个人,却永远不可能在一起。忍耐是一种深沉的爱,却不是每个人都能懂得珍惜。和一个愿意忍耐你的人牵手,远比那些只会给你风花雪月的人来得更长久。