<!--添加广告位信息开始--> <div class="all" > <div class="widget-header"> <h5>广告位明细(最多5条)</h5><div ><h5 id="newyz1">+增加</h5></div> </div> <div class="one1"> <div class="contract-contracttype"> <div class="form-group field-contract-contracttype required has-success"> <label class="col-sm-1 control-label no-padding-right" for="receivableamount[contractId]">广告位</label> <div class="col-lg-2"> <input type="hidden" class="advertId" name="advertId[]" id="advertId" value=""> <input type="hidden" class="advertname1" name="advertname1[]" id="advertname1" value=""> <select id="port" class="form-control port" name="port[]" onchange="checkadvertname(this);"> <?php foreach($port as $key=>$value):?> <option value="<?=$value['key']?>"><?=$value['value']?></option> <?php endforeach;?> </select> </div> <div class="col-lg-2"> <select id="page" class="form-control page" name="page[]" onchange="checkadvertname(this);"> <?php foreach($page as $key=>$value):?> <option value="<?=$value['key']?>"><?=$value['value']?></option> <?php endforeach;?> </select> </div> <div class="col-lg-2"> <select id="advertname" class="form-control advertname" name="advertname[]" onchange="getadvert(this)"> <option value="0">请选择广告位</option> </select> </div> </div> </div> <div class="form-group field-applypay-paymenttime"> <label class="col-sm-1 control-label no-padding-right" for="applypay-paymenttime">发布时间</label> <div class="col-sm-3 col-lg-2"> <div class="input-group"> <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span> <input class="form-control date-picker datetime-picker3" id="projectStime" name="projectStime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text"> <em >-</em> </div> </div> <div class="col-sm-3 col-lg-2"> <div class="input-group"> <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span> <input class="form-control date-picker datetime-picker3" id="projectEtime" name="projectEtime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text"> </div> </div> </div> <div class="form-group field-receivableamout-reason required"> <label class="col-sm-1 control-label no-padding-right" for="receivableamout-reason">备注说明</label> <div class="col-lg-5"><input type="text" id="receivableamout-reason" class="form-control" name="reason[]" maxlength="100"></div> <div class="col-lg-3"> <div class="help-block"></div></div> </div> </div> <span class="form-group" id="xx"> </span> <div class="form-group field-receivableamout-reason required"> <label class="col-lg-1 control-label no-padding-right" for="receivableamout-reason">上传附件</label> <div class="col-lg-11 wdata1"> <div class="col-lg-3 btnimg"> <label for="uploadImg" class="btn btn-primary fileimg"><i class="fa-plus-sign"></i> <span>上传</span> <input class="UploadImg" data="1" type="file" name="files[]" multiple></label> </label> </div> </div> </div> </div> <!--添加广告位信息结束-->
$("#newyz1").bind('click',function() { _addnum++; var num=_addnum; console.log(num); if($(".one1").length>4){ layer.msg("最多5条数据"); return false; } var html='<div class="one1">\n' + ' <div class="contract-contracttype">\n' + ' <div class="form-group field-contract-contracttype required has-success">\n' + '<input type="hidden" class="advertId" name="advertId[]" id="advertId" value="">\n'+ ' <input type="hidden" class="advertname1" name="advertname1[]" id="advertname1" value="">\n'+ ' <label class="col-sm-1 control-label no-padding-right" for="receivableamount[contractId]">广告位</label>\n' + ' <a href="javascript:void(0)" class="khnimus1" title="" id="newyz1" data-original-title=""><i class="icon-trash bigger-130"></i></a>\n'+ ' <div class="col-lg-2">\n' + ' <select id="port" class="form-control port" name="port[]" onchange="checkadvertname(this);">\n'; for (var i=0;i<ports.length;i++){ html+='<option value='+ports[i]['key']+'>'+ports[i]['value']+'</option>'; } html+='</select>\n' + ' </div>\n' + ' <div class="col-lg-2">\n' + ' <select id="page" class="form-control page" name="page[]" onchange="checkadvertname(this);" >\n'; for (var i=0;i<pages.length;i++){ html+='<option value='+pages[i]['key']+'>'+pages[i]['value']+'</option>'; } html+='</select>\n' + ' </select>\n' + ' </div>\n' + ' <div class="col-lg-2">\n' + ' <select id="advertname" class="form-control advertname" name="advertname[]" onchange="getadvert(this)" >\n' + ' <option value="0">请选择广告位</option>\n' + ' </select>\n' + ' </div>\n' + '\n' + ' </div>\n' + ' </div>\n' + ' <div class="form-group field-applypay-paymenttime">\n' + ' <label class="col-sm-1 control-label no-padding-right" for="applypay-paymenttime">发布时间</label>\n' + ' <div class="col-sm-3 col-lg-2">\n' + ' <div class="input-group">\n' + ' <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span>\n' + ' <input class="form-control date-picker datetime-picker3" id="projectStime" name="projectStime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" type="text">\n' + ' <em >-</em>\n' + ' </div>\n' + ' </div>\n' + ' <div class="col-sm-3 col-lg-2">\n' + ' <div class="input-group">\n' + ' <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span>\n' + ' <input class="form-control date-picker datetime-picker3" id="projectEtime" name="projectEtime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" type="text">\n' + ' </div>\n' + ' </div>\n' + ' </div>\n' + ' <div class="form-group field-receivableamout-reason required">\n' + ' <label class="col-sm-1 control-label no-padding-right" for="receivableamout-reason">备注说明</label>\n' + ' <div class="col-lg-5"><input type="text" id="receivableamout-reason" class="form-control" name="reason[]" maxlength="100"></div>\n' + ' <div class="col-lg-3">\n' + ' <div class="help-block"></div></div>\n' + ' </div>\n' + // ' <div class="form-group field-receivableamout-reason required">\n' + // ' <label class="col-lg-1 control-label no-padding-right" for="receivableamout-reason">上传附件</label>\n' + // ' <div class="col-lg-11 wdata'+num+'">\n' + // ' <div class="col-lg-3 btnimg">\n' + // ' <label for="uploadImg" class="btn btn-primary fileimg"><i class="fa-plus-sign"></i>\n' + // ' <span>上传</span>\n' + // ' <input class="UploadImg" data="'+num+'" type="file" name="files[]" multiple></label>\n' + // ' </label>\n' + // ' </div>\n' + // ' </div>\n' + // ' </div>\n'+ '</div>'; $('#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(); }); });创新互联专注于企业成都全网营销、网站重做改版、长寿网站定制设计、自适应品牌网站建设、html5、商城开发、集团公司官网建设、外贸营销网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为长寿等各大城市提供网站开发制作服务。
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享题目:jq点击增加一段html-创新互联
分享地址:https://www.cdcxhl.com/article38/dosppp.html
成都网站建设公司_创新互联,为您提供标签优化、网站营销、商城网站、网站策划、App开发、网站内链
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联