<!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>
不是努力了就有机会,方向错了,再怎么努力也只能是徒劳,这就像是我们在打牌的时候,摸到一副臭牌,就不要在希望这一盘是赢家,只有傻子才在手气不好的时候,对自己手上的一把臭牌说,咱们只要努力就一定会胜利。