怎么样动态的添加行?

悟空师傅来了 2004-04-02 01:18:45
<table width="592" border="1" bordercolor="#CC0033">
<tr>
<th width="168" scope="row" align="center" bgcolor="#FFCC66">发现时间</th>
<th width="181" scope="row" align="center" bgcolor="#FFCC66">具体并发症情况</th>
<th width="546" scope="row" align="center" bgcolor="#FFCC66">处理</th>
</tr>
<tr>
<th height="64" align="left" scope="row"><input name="find_time" type="text" id="find_time" maxlength="10"></th>
<td><textarea name="thing" id="thing"></textarea></td>
<td><textarea name="dispose" cols="30" id="dispose"></textarea></td>
</tr>
</table>
<p align="left">
<input type=button name=Submit value=增加行>
</p>
当点击增加行按钮时动态的增加跟上面行一样的内容;还有就是表单提交时怎么将动态行中输入的内容插入的数据库中,麻烦大家给看看,谢谢
...全文
52 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
悟空师傅来了 2004-04-05
  • 打赏
  • 举报
回复
up
jasonboy 2004-04-02
  • 打赏
  • 举报
回复
看看这个应该对你有所帮助
http://expert.csdn.net/Expert/topic/2843/2843234.xml?temp=.195904
zhangxdd 2004-04-02
  • 打赏
  • 举报
回复
gz
zyl107 2004-04-02
  • 打赏
  • 举报
回复
up
a_zhe_20 2004-04-02
  • 打赏
  • 举报
回复
count=document.form1.selid.value;
var newRow = TB.insertRow();
var newCell;
var a = new Array();
a[0]='<input type=text name=A0'+count+' value="'+A0val+'" class="text" style="width:88px" readonly><input type=hidden name=C0'+count+' value="'+C0val+'">';
a[1]='<input type="text" name=C1'+count+' value="'+C1val+'" class="text" style="width:28px" onKeypress="JHshNumberText()">';
a[2]='<input type="text" name=C2'+count+' value="'+C2val+'" class="text" style="width:28px" onKeypress="JHshNumberText()" onblur="checkscore()">';
a[3]='<input type="text" name=C3'+count+' value="'+C3val+'" class="text" style="width:112px">';
a[4]='<input type="text" name=C4'+count+' value="'+C4val+'" class="text" style="width:148px">';
a[5]='<input type="hidden" name=C5'+count+' value="'+C5val+'">';
a[6]='<div align=right><input type="button" name=B6'+count+' value="删 除" onclick="delline()" class="text"></div>'
for(var i=0; i<=6; i++)
{
newCell = newRow.insertCell(i);
//newCell.align="center";
newCell.innerHTML = a[i];
}
count++;
document.form1.selid.value=count;


可以参考一下。。
悟空师傅来了 2004-04-02
  • 打赏
  • 举报
回复
up

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧