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>

  • 相关阅读:
    用ssh从ubuntu系统向ubuntu系统服务器发送文件
    python import caffe失败的可能原因
    segnet caffe upsample top index 0 out of range
    出了问题检查下你的caffe 搭建步骤
    由于不能随便改路径,所以写在这里
    关于DatePicker设置MinDate和MaxDate的几个坑
    Socket I/O multiplexing
    STL_迭代器
    基本套接字
    STL_空间配置器(allocators)
  • 原文地址:https://www.cnblogs.com/sweet521/p/5695544.html
Copyright © 2011-2022 走看看