Home > Article > Web Front-end > Detailed introduction about layer.js implementing the pop-up box selection of delivery address and then returning the corresponding address information.
This article mainly introduces the realization of the delivery address pop-up box selection based on layer.js and then returns the corresponding address information. Friends who need it can refer to it
I will show it to you first. Rendering:
The core code is as follows:
(‘.selectaddress').click(function () {//图一联系方式中的点击事件 top.layer.open({ id: “layer_say_hello”, type: 2, title: ‘请点击选择联系地址', shadeClose: true, shade: 0.8, area: [‘300px', ‘400px'], content: “{:Url(‘/mobile/user/address_list')}”, //iframe的url success: function (layero, index) { // var jquerySendHelloButton =(“.addre span”, layero.find(“iframe”)[0].contentWindow.document); var jquerySendHelloButton = (“.listdetail”,layero.find(“iframe”)[0].contentWindow.document);(jquerySendHelloButton).click(function () { var addressid = (this).find(‘.addressId′).val();varconsignee=(this).find(‘.contact span').eq(0).text(); var phone = (this).find(‘.contactspan′).eq(1).text();varaddre=(this).find(‘.addre span').text(); (‘.contactspan′).eq(0).text(consignee);(‘.contact span').eq(1).text(phone); (‘.addrespan′).eq(0).text(addre);(‘input[name=address_id]').val(addressid); (‘.selec′).css(‘display′,′none′);(‘.demand_add').css(‘display','block'); layer.close(index); }) //传入参数,并赋值给iframe的元素 } }); })
The above is the detailed content of Detailed introduction about layer.js implementing the pop-up box selection of delivery address and then returning the corresponding address information.. For more information, please follow other related articles on the PHP Chinese website!