Layer Parent page Gets the values ​​in the pop-up input box

Mainly because of the modification function, the original page fills in the data is shown in Figure

layer父页获取弹出层输入框里面的值方法 Change to

One click to fill in the factory box layer父页获取弹出层输入框里面的值方法

After completing, click OK to return, the colleague here is here because she is a multitaus, so the data is saved directly, This feature is originally saved as a whole, I don’t want to change the original logic, just want to bring the fills to the hidden control, when I follow the original logic, there is no way to search for her, last search Many, solved the problem, the specific code is as follows:


Total source (yuan)
JS: // Pop-up funded source details function showamountdetail () {var index = ({type: 2, Title: 'Fill in the Fund Detail', ShadeClose: False, Skin: 'Layui-Layer-Rim', Area: ['50% ', '50%'], Maxmin: True, Content: '/ Project / Amountdetail? Projectcode = '+ "@Projectcode", btn: [' OK ',' Close '], YES: Function (Index, Layero) {Debugger; var body = layer.getchIldFrame ('body', index); // Get the body of the iFrame page VAR CENTERAMOUNT = body.find ("# centeramount"). Val (); var cityamount = body.find ("# Cityamount"). VAL () Var disamount = body.find ("# disamount"). Val (); var streetamount = body.find ("# streetamount"). Val (); var othamount = body.find ("# 帖子ERAMOUNT"). VAL ); if (centeramount == null || centeramount == ") CENTERAMOUNT = 0; if (cityamount == null || cityamount ==") Cityamount = 0; if (disamount == null || disamount == " ") Disamount = 0; if (streetamount == null || streetamount ==" ") streetamount = 0; if (Othamount == Null || OthaMount ==") OtHERAMOUNT = 0; Sum = Number (CenterAmount) + Number (CityAmount) + Number (StreeTamount) + Number (Othamount); Document.getElementByid ("centeramount"). Value = centelecount; Document.GtelementById ( "CityAmount") value = CityAmount;.. document.getElementById ( "DisAmount") value = DisAmount; document.getElementById ( "StreetAmount") value = StreetAmount;.. document.getElementById ( "OtherAmount") value = OtherAmount; Document.getlementByid ("amountsum"). Value = SUM; // Finally close the pop-up layer Layer.close (});}, ca Zan: function () {// Turn off the callback}} in the upper right corner; // Layer.Full Index);}
Child page:

   Economic source details 
central allocation (yuan)

  Regional funds (yuan)      Street Town Support (yuan)    
Other (yuan) The above Layer parent page acquiring the value method in the pop-up input box is the full content of Xiaobian sharing to everyone, I hope I can give you a reference, I hope everyone will support Tumi Cloud.
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment