当填充信息在下面添加更多地址然后点击新地址添加更多地址和填充数据时只有先前填充的数据显示不显示数据中的新数据只显示数组
<h3>Delivery Address</h3>
<form name="register" method="post" action="insert.php" >
name<br /><input name="name" type="text" size="20" /><br />
email<br /><input name="email" type="text" size="20" /><br />
password<br /><input name="password" type="password" size="20" /><br />
address:<br>
Line 1<br /><input name="address" type="text" size="20" /><br />
city<br /><input name="city" type="text" size="20" /><br />
state<br /><input name="state" type="text" size="20" /><br />
<div id="itemRows">
<input onclick="addRow(this.form);" type="button" value="add more address" /><br>
Line1 <br><input type="text" name="address1" size="20" /><br/>
city<br> <input type="text" size="20" name="city1" /> <br />
state<br /><input name="state1" type="text" size="20" /><br />
</div>
<input type="submit" name="submit" value="submit" />
</form>
<script>
var rowNum = 0;
function addRow(frm) {
rowNum ++;
var row = '<p id="rowNum'+rowNum+'">Line1 <input type="text" name="address1" size="20" value="'+frm.address1.value+'"> city<input type="text" name="city1" value="'+frm.city1.value+'">state <input type="text" name="state1" size="20" value="'+frm.state1.value+'"> <input type="button" value="Remove" onclick="removeRow('+rowNum+');"></p>';
jQuery('#itemRows').append(row);
frm.address1.value = '';
frm.city1.value = '';
frm.state1.value = '';
}
</script><script>
function removeRow(rnum) {
jQuery('#rowNum'+rnum).remove();}</script>