zoukankan      html  css  js  c++  java
  • 根据table随时添加列

    var newRow = '<tr align="center" class="tdbg" id="tr'+temp[0]+'">'+
                        '<td nowrap="nowrap">'+
                        '    <input type="checkbox" name="checkbox_2" id="tcheckbox_'+temp[0]+'" value="'+temp[0]+'" class="chebox" checked="checked"/>'+
                        '</td>'+
                        '<td>'+temp[1]+'</td>'+
                        '<td>'+temp[2]+'</td>'+
                        '<td>'+temp[3]+'</td>'+
                        '<td>'+temp[4]+'</td>'+
                        '<td align="right">'+parseFloat(temp[5]).toFixed(2)+'</td>'+
                        '<td>'+temp[6]+'</td>'+
                        '<td>'+temp[7]+'</td>'+
                        '<td><a href="javascript:void(0)" onclick="delTR('+temp[0]+')">取消</a></td>';
    
                    
                        $('#table0 tr:last').after(newRow);    
                        $('#table0').show();
                        $('#table0.adv_query_list tr.tdbg:odd').addClass('tdbg_even');//格行换色
    <table id="table0" class="adv_query_list">
                            <tr class="search_title_show" >
                                <td align="center">选择</td>
                                <td align="center">1</td>
                                <td align="center">2</td>
                                <td align="center">3</td>
                                <td align="center">4</td>
                                <td align="center">5</td>
                                <td align="center">6</td>
                                <td align="center">7</td>
                                <td align="center">8</td>
                            </tr>
                            <!--                         通过js添加 -->
                            
                    </table>
  • 相关阅读:
    面试(5)
    面试(五)
    面试(4)
    面试(四)
    面试(三)
    面试(2,3)
    利用session控制 长时间未操作自动退出登录
    一次性清除所有session
    动态引进js文件
    Vue--findIndex方法的使用原理
  • 原文地址:https://www.cnblogs.com/yy123/p/4329498.html
Copyright © 2011-2022 走看看