我用jquery的一个函数动态增加input输入框,但是提交的时候好像php不认????form里面已经有两个选项,增加input输入框后,提交之后choice数据还是2(用下面红字的地方显示).  为什么呢???5555~~~快哭啦~~  各位老师帮忙帮忙~~~
代码如下:
<?php if ($sendadd)
{
$db=initdb(); $data=$_POST["choice"]; }?><html>
<head>
<script type="text/javascript" src="../../include/jquery/tablesorter.pager/jquery-latest.js"></script>
<script >
// add method
 $(document).ready(function(){ $("#but").click(function(){    //添加选项
 var $table=$("#tab_choice tr");
 var len=$table.length;
 $("#tab_choice").append("<tr class=\"firstalt\" nowrap name=\"choice[]\" id="+(len)+"><td width=\"30%\" style=\"font-size:16px;\">选项"+(len)+":</td><td align='center'><input maxLength=\"100\" size=\"60\" name=\"title\" value=\"\"></td></tr>");
 }) $("#but_del").click(function(){   //删除选项
$table=$("#tab_choice tr");
  $("tr[id='"+($table.length-1)+"']").remove();
 }) })
</script>
</head>
<body align="center">
  <br/>
<? echo count($data);  ?>
<form name="article" method="post" encType="multipart/form-data" >
<table class="tableoutline" cellSpacing="1" cellPadding="4" width="90%" align="center" border="0" id="tab_choice">
<tr id="cat">
<td class="tbhead" colSpan="3"><b>选项</b></td>
</tr>
<tr class="firstalt" nowrap>
<td width="30%" style="font-size:16px;">选项1:</td>
<td align='center'><input maxLength="100" size="60" name="choice[]" value=""> </td>
</tr>
<tr class="firstalt" nowrap>
<td width="30%" style="font-size:16px;">选项2:</td>
<td align='center'><input maxLength="100" size="60" name="choice[]" value=""> </td>
</tr>
</table> <table class="tableoutline" cellSpacing="1" cellPadding="4" width="90%" align="center" border="0" >
<tr class="tbhead">
<td align="right" colSpan="2">
         <input class="bginput" type="button" id="but" value="添加选项"/>
         <input class="bginput" type="button" id="but_del" value="删除选项"/>
<input class="bginput" accessKey="y" type="submit" value=" 提交 " name="sendadd">&nbsp;&nbsp;
</td>
</tr>
</table>
</form>
</body>
</html>