您好,登錄后才能下訂單哦!
function canshuadd(){ var html='<div class="panel panel-default toggle">'; // html+='<label class="col-lg-2 control-label">*名稱:</label>'; html+='<div class="col-lg-4" >'; html+='<input type="hidden" name="style" id="style" value="add">'; html+='名稱:<input type="text" id="parmaName" name="parmaName" value="" >'; html+='</div>'; html+='</div>'; layer.open({ shade: 0.8, title: '添加參數(shù)名稱', type: 1, area : ['400px' , '200px'], btn: ['提交', '取消'], yes: function(index, layero){ var parma = {}; parma.parentId=parentId1; parma.style=$("#style").val(); parma.parmaName = $("#parmaName").val(); console.log(parma.parmaName);console.log(parma.parentId);console.log(parma.style); if(parma.parmaName== ""){ layer.msg("數(shù)據(jù)不能為空"); layer.close(index); return false; } $.post(submiturl,parma,function(data){ if(data == 1){ window.location.href=window.location.href; layer.msg("操作成功"); layer.close(index); }else if(data==3){ layer.msg("數(shù)據(jù)重復(fù)了。") } else{ layer.msg("操作失敗"); } }); layer.close(index); }, close : function(index){ layer.close(index); }, content: html }); return false; }
傳參數(shù)到iframe頁(yè)面打開頁(yè)面并進(jìn)行數(shù)據(jù)驗(yàn)證 function typemod(pr){ _followTypeId=$(pr).attr('data'); var submiturl=$(pr).attr('data1'); var houseediturl=$(pr).attr('data2'); layer.open({ shade: 0.8, title: '修改參數(shù)名稱', type: 2, area: ['600px', '580px'], btn: ['提交', '取消'], yes: function (index, layero) { var parma = {}; parma.followTypeId =_followTypeId; parma.style ='mod'; parma.followText = $.trim(layer.getChildFrame('[name="followText"]', index).val()); parma.examineStyle = $.trim(layer.getChildFrame('input:radio[name=examineStyle]:checked',index).val()); //parma.style = $.trim(layer.getChildFrame('[name="style"]', index).val()); parma.range =$.trim(layer.getChildFrame('[name="range"]', index).val()); parma.examineJob =$.trim(layer.getChildFrame('[name="examineJob"]', index).val()); console.log(parma.followText); console.log(parma.style); console.log(parma.examineStyle); console.log(parma.range); console.log(parma.examineJob); if (parma.followText == "") { layer.msg("數(shù)據(jù)不能為空"); layer.close(index); return false; } $.post(submiturl, parma, function (data) { if (data == 1) { window.location.href = window.location.href; layer.msg("操作成功"); layer.close(index); } else if (data == 3) { layer.msg("數(shù)據(jù)重復(fù)了。") } else { layer.msg("操作失敗"); } }); layer.close(index); }, close: function (index) { layer.close(index); }, content: houseediturl+'&followTypeId='+_followTypeId }); return false; }
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。