Table控件新增行的问题,简单地说就是点击一下增加一行(急)? 能用.Net中的Table控件完成此功能吗?具体应该怎么做,教教我!(最好能有个例子) 谢了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function Add_onclick() { var newrow = Table1.insertRow(); newrow.insertCell(); newrow.insertCell(); newrow.insertCell(); newrow.insertCell(); newrow.cells[0].innerHTML = "<TD><INPUT id='productCode' name='productCode' style='BACKGROUND-COLOR:#E0E0E0' size='0' type='hidden' value='' readOnly maxLength='50' onchange='Count_Product_Money()'>" +"<INPUT id='productName' name='productName' type='text' style='BACKGROUND-COLOR:#E0E0E0;width:150px' maxLength='150' value='' readOnly maxLength='200'>" +"<INPUT id='btgetproductCode' name='btgetproductCode'type='button' style='width:70px' value='选择产品...' onclick='SelectproductCode()'></TD>"; newrow.cells[1].innerHTML = "<TD><INPUT id='price' name='price' type='text' style='BACKGROUND-COLOR:#E0E0E0;width:100px' maxLength='100' value='0' readOnly onchange='Count_Product_Money()'></TD>"; newrow.cells[2].innerHTML = "<TD><INPUT id='number' name='number' type='text' style='width:100px' maxLength='100' value='0' onchange='Count_Product_Money()' onfocus='getfocus()'></TD>"; newrow.cells[3].innerHTML = "<TD><INPUT id='money' name='money' type='text' style='BACKGROUND-COLOR:#E0E0E0;width:100px' maxLength='100' readOnly value='0'></TD>";} 可以。但是建议使用datagrid控件。另,楼上Cell[i]的innerHTML里还包括<td>,</td>,应该不对。 用table控件的话,只能在增加了行以后从新读取数据库后填充table. 使用asp.net打开mdb文件时提示密码无效 asp.net怎么才能在后台打开硬盘上的一个文件 急急急急急!!!!!!!! VS 2008,加载安装组件时遇到问题,取消安装 asp.net 执行带多个参数的存储过程 急!如何做web安装程序包,以及升级程序的制作? 按quickstart 上示例做不同版本的网页,不能成功,请赐教. 如何自己在浏览器中自己定义右键点击的菜单?? datagird中日期显示问题 功能强大的在线HTML编辑器 请问高手:我用INSERT插入中文到ACCESS乱码的问题!谢谢! 能不能用xmlhttp来下载文件?
var newrow = Table1.insertRow();
newrow.insertCell();
newrow.insertCell();
newrow.insertCell();
newrow.insertCell();
newrow.cells[0].innerHTML = "<TD><INPUT id='productCode' name='productCode' style='BACKGROUND-COLOR:#E0E0E0' size='0' type='hidden' value='' readOnly maxLength='50' onchange='Count_Product_Money()'>"
+"<INPUT id='productName' name='productName' type='text' style='BACKGROUND-COLOR:#E0E0E0;width:150px' maxLength='150' value='' readOnly maxLength='200'>"
+"<INPUT id='btgetproductCode' name='btgetproductCode'type='button' style='width:70px' value='选择产品...' onclick='SelectproductCode()'></TD>";
newrow.cells[1].innerHTML = "<TD><INPUT id='price' name='price' type='text' style='BACKGROUND-COLOR:#E0E0E0;width:100px' maxLength='100' value='0' readOnly onchange='Count_Product_Money()'></TD>";
newrow.cells[2].innerHTML = "<TD><INPUT id='number' name='number' type='text' style='width:100px' maxLength='100' value='0' onchange='Count_Product_Money()' onfocus='getfocus()'></TD>";
newrow.cells[3].innerHTML = "<TD><INPUT id='money' name='money' type='text' style='BACKGROUND-COLOR:#E0E0E0;width:100px' maxLength='100' readOnly value='0'></TD>";
}