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>

  • 相关阅读:
    劳动手册补办
    敏捷开发之“燃尽图之谜”
    JIra配置权限方案
    Scrum的三个仪式:Sprint规划会,Scrum每日站会,Sprint评审会
    Jira更改工作流后,敏捷看板里无法显示sprint对应的问题列表
    JIRA使用过程出现问题整理解答
    2020系统综合实践 第8次实践作业
    2020系统综合实践 第7次实践作业
    2020系统综合实践 第6次实践作业
    2020系统综合实践 第5次实践作业
  • 原文地址:https://www.cnblogs.com/sweet521/p/5695544.html
Copyright © 2011-2022 走看看