成都创新互联网站制作重庆分公司

jq点击增加一段html



    
        
广告位明细(最多5条)
+增加
    
                                           广告位                                                                                                         $value):?>                         ">                                                               
                                                              $value):?>                             ">                                                                                                                              请选择广告位                                                                                  发布时间                                                                                             -                                                                                                                                                                   备注说明                                                                                 上传附件                                                            上传                                                                 
 $("#newyz1").bind('click',function() {
                    _addnum++;
                    var num=_addnum;
                    console.log(num);
                    if($(".one1").length>4){
                        layer.msg("最多5条数据");
                        return false;
                    }
                    var html='\n' +
                        '                \n' +
                        '                    \n' +
                        '\n'+
                        ' \n'+
                        '                        广告位\n' +
                        '                    \n'+
                        '                        \n' +
                        '                            \n';
                    for (var i=0;i'+ports[i]['value']+'';
                    }
                    html+='\n' +
                        '                        \n' +
                        '                        \n' +
                        '                            \n';
                    for (var i=0;i'+pages[i]['value']+'';
                    }
                    html+='\n' +
                        '                            \n' +
                        '                        \n' +
                        '                        \n' +
                        '                            \n' +
                        '                                请选择广告位\n' +
                        '                            \n' +
                        '                        \n' +
                        '\n' +
                        '                    \n' +
                        '                \n' +
                        '                \n' +
                        '                    发布时间\n' +
                        '                    \n' +
                        '                        \n' +
                        '                            \n' +
                        '                            \n' +
                        '                            -\n' +
                        '                        \n' +
                        '                    \n' +
                        '                    \n' +
                        '                        \n' +
                        '                            \n' +
                        '                            \n' +
                        '                        \n' +
                        '                    \n' +
                        '                \n' +
                        '                \n' +
                        '                    备注说明\n' +
                        '                    \n' +
                        '                    \n' +
                        '                        \n' +
                        '                \n' +
//                            ' \n' +
//                        '                    上传附件\n' +
//                        '                    \n' +
//                        '                        \n' +
//                        '                            \n' +
//                        '                                上传\n' +
//                        '                                \n' +
//                        '                            \n' +
//                        '                        \n' +
//                        '                    \n' +
//                        '                \n'+
                    '';
                    $('#xx').append(html);

                    //jq上传插件开始
                    $(".UploadImg").fileupload({
                        url: 'http://imgapi.qq.com/upload/php/upload.php',
                        sequentialUploads: true,
                        formData: {"app": 'brzy'},
                        returnType: "json",
                        acceptFiles: "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/*,p_w_picpath/*,.pdf,.zip,.rar,.doc,.docx",
                        dataType: 'json',

// 上传完成后的执行逻辑
                        done: function (e, data) {
                            var n = data.jqXHR.responseText;
                            var an = JSON.parse(n);
                            // console.log(an);
                            layer.closeAll();
                            // if(typeof(_clickBut)=='undefined'){
                            //     var _clickBut='';
                            // }
                            _clickBut = $(this).attr('data');//哪个按钮被点击了
                            console.log($(this));
                            callback(an.url);
                        },
// 上传过程中的回调函数
                        progressall: function (e, data) {
                            layer.load(0, {shade: false});
                        }
                    });

                    //jq插件结束
                    $(".khnimus1").live('click',function(){
                        $(this).parents(".one1").remove();
                    });
                });

网页名称:jq点击增加一段html
网站URL:http://cxhlcq.com/article/pegpsj.html

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部