JS如何获取多个动态添加的表单的数据
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
<button id= "addDiv">添加DIV</button>
<div id ="two">
<ul id="one" class="one">
<div>
<span>姓名:</span>
<input type="text" class="input">
</div>
<div>
<span>性别:</span>
<input type="text" class="input">
</div>
<div>
<span>电话:</span>
<input type="text" class="input">
</div>
</ul>
</div>
<button id="submit0"></button>
<script>
$("#addDiv").click(function addDom() {
var one = document.getElementById("one");
var oldHtml=one.innerHTML;
var oldHtml ='<ul class="one">'+oldHtml +'</ul>';
$("#two").append(oldHtml);
})
</script>
</body>
</html>