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.

Detailed introduction about layer.js implementing the pop-up box selection of delivery address and then returning the corresponding address information.

黄舟
黄舟Original
2017-05-27 13:13:492635browse

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:

Detailed introduction about layer.js implementing the pop-up box selection of delivery address and then returning the corresponding address information.
Detailed introduction about layer.js implementing the pop-up box selection of delivery address and then returning the corresponding address information.
Detailed introduction about layer.js implementing the pop-up box selection of delivery address and then returning the corresponding address information.

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn