zoukankan      html  css  js  c++  java
  • JS添加标签

    <script>
                function show(){
                    $('.add').unbind();
                    $('.low').unbind();

                    $('.add').click(function(){ // 加好;
                        var html=$(this).closest('tr').html();
                        var str='<tr class="tr">'
                            str+='<td><input name="material[]" type="text" /></td>'
                            str+='<td><input name="size[]" type="text" /></td>'
                            str+='<td><input name="membrane[]" type="text" /></td>'
                            str+='<td><input name="angle[]" type="text" /></td>'
                            str+='<td><input name="moq[]" type="text" /></td>'
                            str+='<td><input name="price[]" type="text" /></td>'
                            str+='<td><input name="duration[]" type="text" /></td>'
                            str+='<td><a href="javascript:;" class="low">-</a><a href="javascript:;" class="add">+</a></td>'
                            str+='</tr>'
                        $('.tbody').append(str);
                        // $(this).remove();
                        show();
                    })

                    $('.low').click(function(){ // 剑豪
                        if($('.tbody tr').length > 1){
                            $(this).parents('tr').remove();
                        }
                    })    
                }
                show();
            </script>

  • 相关阅读:
    RobotFrameWork--selenium2模拟chrome的user agent
    robot设置chrome mobile emulation
    [转]如何用git将项目代码上传到github
    poj1182 食物链【并查集-好题!】
    hdu4998 Rotate【计算几何】
    poj3168 Barn Expansion【计算几何 平面扫描】
    FZU2110 Star【计算几何】
    poj1269 intersecting lines【计算几何】
    poj3304 Segments【计算几何】
    java大数
  • 原文地址:https://www.cnblogs.com/sweet521/p/5695544.html
Copyright © 2011-2022 走看看