日期:2014-05-16 浏览次数:21022 次
<table class="tableStyle" id="silk0">
<tr>
<%-- <td width="5%" rowspan="2" id="SilkLeft">组织丝线表</td>--%>
<td width="10%">丝线序号</td>
<td width="10%">丝线经纬</td>
<td width="10%">丝线类型</td>
<td width="10%">丝线密度</td>
<td width="10%">丝线描述</td>
</tr>
<tr id="SilkRight">
<td><input type="text" name="basicBean[0].structureBeans[0].silkBeans[0].silkId" value="<%=b0s0s0silkId%>"></td>
<td><input type="text" name="basicBean[0].structureBeans[0].silkBeans[0].silkWarpOrWeft" value="<%=b0s0s0silkWarpOrWeft%>"></td>
<td><input type="text" name="basicBean[0].structureBeans[0].silkBeans[0].silkType" value="<%=b0s0s0silkType%>"></td>
<td><input type="text" name="basicBean[0].structureBeans[0].silkBeans[0].silkDensity" value="<%=b0s0s0silkDensity%>"></td>
<td><input type="text" name="basicBean[0].structureBeans[0].silkBeans[0].silkColor" value="<%=b0s0s0silkColor%>"><input id="btnAddRow1" class="btn1"
onclick="AddStructureRowSilk()" type="button" value="+" /></td>
</tr>
</table>
<script language="javascript" type="text/javascript">
//表单操作
function AddStructureRowSilk()
{
var structurect=document.getElementById("structureCount").value; //取得添加组织结构表的个数
structurect=parseInt(structurect)-1; //转成int型
var count=document.getElementById("silkcount"+structurect).value; //实现组织参数表计数
count=parseInt(count)+1; //点击一次+1
document.getElementById("silkcount"+structurect).value=count;
var obj=document.getElementById("silk"+structurect);
var tr= obj.rows["SilkRight"];
//alert(tr.rowIndex);
//var count=document.getElementById("SilkLeft").getAttribute("rowspan");
//document.getElementById("SilkLeft").setAttribute("rowSpan",parseInt(count)+1);
//alert(count);
//document.getElementById("silkcount1").value=count;
//插入行 code form www.jb51 .net
var tr =obj.insertRow(tr.rowIndex+1);
var trId="trStructure"+tr.rowIndex;
tr.setAttribute("id",trId);
//<s:set var="ct"&n