多个表格头合并编辑获取表格内元素内容

来源:互联网 发布:sql if两个判断 编辑:程序博客网 时间:2024/06/03 18:41
<html><head> <script type="text/javascript"> function addrow() {    //alert ('add row');//alert (document.getElementById("row1col3").value);var tabObj=document.getElementById("tab_Test5");//获取添加数据的表格alert(tabObj.rows[5].cells[0].innerHTML);alert(tabObj.rows[5].cells[2].innerHTML);alert(tabObj.rows[6].cells[6].innerHTML);//获取表格内容tabObj.rows[6].cells[6].innerHTML = "dkewiksdksd";//修改表格元素内容var rowsNum = tabObj.rows.length;  //获取当前行数   var colsNum=tabObj.rows[rowsNum-1].cells.length;//获取行的列数   var myNewRow = tabObj.insertRow(13);//插入新行   var newTdObj1=myNewRow.insertCell(0);   newTdObj1.innerHTML="<input type='checkbox' name='chkArr' id='chkArr'"+rowsNum+" style='width:20px' />";   var newTdObj2=myNewRow.insertCell(1);   newTdObj2.innerHTML="<input type='text' name='nodecode' id='nodecode'"+rowsNum+" style='width:40px' value='"+rowsNum+"'/>";   var newTdObj3=myNewRow.insertCell(2);   newTdObj3.innerHTML="<input type='text' name='nodename' id='nodename'"+rowsNum+" style='width:120px' />";   var newTdObj4=myNewRow.insertCell(3);   newTdObj4.innerHTML="<input type='text' name='nodeper' id='nodeper'"+rowsNum+" style='width:60px' />";    } </script>  <script type="text/javascript">var tabProduct = document.getElementById("tab_Test5");// 设置表格可编辑// 可一次设置多个,例如:EditTables(tb1,tb2,tb2,......)EditTables(tabProduct);</script></head><body><h3>例五:上3行下1行4列固定 $("#tab_Test5").FrozenTable(3,1,4);</h3><input id="changebtn" type="button" onclick="addrow()" value = "addrow"/><div id="tablediv" style="OVERFLOW: auto;width:1330px;height:300x;"><table id="tab_Test5" border="1" width="1000"><tbody align="center"><tr class="tabTh"><td rowspan="3" colspan="2" width="100" nowrap="nowrap">险种大类</td><td colspan="3" nowrap="nowrap">201401</td><td colspan="3" nowrap="nowrap">201402</td><td colspan="3" nowrap="nowrap">201403</td></tr><tr class="tabTh"><td colspan="3" nowrap="nowrap">保费收入-再保前</td><td colspan="3" nowrap="nowrap">保费收入-再保前</td><td colspan="3" nowrap="nowrap">保费收入-再保前</td></tr><tr class="tabTh"><td width="100" nowrap="nowrap">业务</td><td width="100" nowrap="nowrap">财务</td><td width="100" nowrap="nowrap">差异</td><td width="100" nowrap="nowrap">业务</td><td width="100" nowrap="nowrap">财务</td><td width="100" nowrap="nowrap">差异</td><td width="100" nowrap="nowrap">业务</td><td width="100" nowrap="nowrap">财务</td><td width="100" nowrap="nowrap">差异</td></tr><tr class="tabTh"><td id = "aaaa" rowspan="3" width="100" nowrap="nowrap">A大类大类</td>                <td nowrap="nowrap">A1</td><td nowrap="nowrap">1234</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>    <td nowrap="nowrap">A2</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>                <td nowrap="nowrap">A3</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr class="tabTh"><td rowspan="2" width="100" nowrap="nowrap">B大类大类</td>                <td nowrap="nowrap">B1</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>    <td nowrap="nowrap">B2</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr class="tabTh"><td rowspan="3" width="100" nowrap="nowrap">A大类大类</td>                <td nowrap="nowrap">A1</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>    <td nowrap="nowrap">A2</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>                <td nowrap="nowrap">A3</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr class="tabTh"><td rowspan="5" width="100" nowrap="nowrap">D大类大类</td>                <td nowrap="nowrap">D1</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>    <td nowrap="nowrap">D2</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>                <td nowrap="nowrap">D3</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>                <td nowrap="nowrap">D4</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr>                <td nowrap="nowrap">D5</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">1,550,703.52</td><td nowrap="nowrap">0</td><td nowrap="nowrap">33,253.36</td><td nowrap="nowrap">33,751.68</td><td nowrap="nowrap">-498.32</td><td nowrap="nowrap">359,825.44</td><td nowrap="nowrap">359,327.12</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'106T-保证保险');">498.32</a></td></tr><tr><td nowrap="nowrap">107T-车险(交强险)</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">108,975,420.57</td><td nowrap="nowrap">-6,458.44</td><td nowrap="nowrap">59,672,975.8</td><td nowrap="nowrap">59,672,975.8</td><td nowrap="nowrap">0</td><td nowrap="nowrap">93,049,926.62</td><td nowrap="nowrap">93,048,446.62</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'107T-车险(交强险)');">1,480</a></td></tr><tr><td nowrap="nowrap">108T-车险(商业险)</td><td nowrap="nowrap">260,085,392.36</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">260,086,515.73</td><td nowrap="nowrap">-1,123.37</td><td nowrap="nowrap">131,815,686.81</td><td nowrap="nowrap">131,819,291.79</td><td nowrap="nowrap">-3,604.98</td><td nowrap="nowrap">211,276,060.23</td><td nowrap="nowrap">211,279,616.87</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'108T-车险(商业险)');">-3,556.64</a></td></tr><tr><td nowrap="nowrap">109T-房屋险</td><td nowrap="nowrap">1,107,386.23</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">1,119,230.85</td><td nowrap="nowrap">-11,844.62</td><td nowrap="nowrap">369,424.34</td><td nowrap="nowrap">355,734.12</td><td nowrap="nowrap">13,690.22</td><td nowrap="nowrap">960,523.51</td><td nowrap="nowrap">968,921.8</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'109T-房屋险');">-8,398.29</a></td></tr><tr><td nowrap="nowrap">110T-工程险</td><td nowrap="nowrap">52,470,322.9</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">52,507,149.28</td><td nowrap="nowrap">-36,826.38</td><td nowrap="nowrap">14,755,632.67</td><td nowrap="nowrap">14,755,852.67</td><td nowrap="nowrap">-220</td><td nowrap="nowrap">15,896,332.08</td><td nowrap="nowrap">16,042,977.52</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'110T-工程险');">-146,645.44</a></td></tr><tr><td nowrap="nowrap">111T-航空险</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">35,000</td><td nowrap="nowrap">35,000</td><td nowrap="nowrap">0</td><td nowrap="nowrap">24,000</td><td nowrap="nowrap">24,000</td><td nowrap="nowrap">0</td><td nowrap="nowrap">624,139.65</td><td nowrap="nowrap">624,139.65</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'111T-航空险');">0</a></td></tr><tr><td nowrap="nowrap">112T-核能保险</td><td nowrap="nowrap">-32,310.31</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">-32,310.31</td><td nowrap="nowrap">0</td><td nowrap="nowrap">-3,595.88</td><td nowrap="nowrap">-3,595.88</td><td nowrap="nowrap">-0</td><td nowrap="nowrap">0</td><td nowrap="nowrap">613,688.52</td><td nowrap="nowrap"><a href="javascript:funDetail(201403,11,'112T-核能保险');">-613,688.52</a></td></tr><tr class="tabTh"><td nowrap="nowrap">合计</td><td nowrap="nowrap">108,968,962.13</td><td nowrap="nowrap">753,959,667.45</td><td nowrap="nowrap">741,905,397.43</td><td nowrap="nowrap">12,054,270.02</td><td nowrap="nowrap">376,502,238.86</td><td nowrap="nowrap">388,700,315.28</td><td nowrap="nowrap">-12,198,076.42</td><td nowrap="nowrap">553,024,432.25</td><td nowrap="nowrap">554,140,700.32</td><td nowrap="nowrap">6,268.07</td></tr></tbody></table></div></body></html>

0 0