lazyworm
(lazyworm)
注册会员

中级会员
UID 29835
精华
0
积分 111
帖子 111
金钱 111 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2004-7-4 来自 深圳
状态 离线
|
新增表格提交问题
<script>
function aa()
{
var ttable=document.getElementById('table');
var c=ttable.rows[0].cells.length;
var d=ttable.rows.length;
r=ttable.insertRow();
w=r.insertCell();
w.innerHTML="<input type=text name=a2 value=a2>";
w.innerText="a"+(d+1);
}
</script>
<body>
<form action=table.php method=post>
<table id=table border=1 width=70>
<tr><td><input type="text" value="aaa" name=a1></td></tr>
</table>
<input type=button value='添加' onclick=aa()>
<input type="submit" value="Send"></form>
</body>
<?
echo $_POST['a2'];
?>
</html>
已经按下添加按钮添加表格了,请教为什么得不到值??
|
|