<!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>
习惯难受,习惯思念,习惯等你,可是却一直没有习惯看不到你。 如花美眷,似水流年。 回得了过去,回不了当初。 那些最终会让你陷进去的,一开始总是美好。 当你做对的时候,没有人会记得;当你做错的时候,连呼吸都是错。 等待,是一生最初的苍老。 有些事一转身就一辈子 。