SoFunction
Updated on 2025-02-28

Method of passing values ​​to new pages using layer modal box

Yesterday, when using Hui background template, I used modal box to pass the value to another new page

This is how the template is written. There is no way to pass the value to the new page, so I went to Baidu and summarize

function zhuyuan(title,url,id,w,h,type){
  ({
    title:'Add a category',
    type: 2,
    area: ['700px', '530px'],
    fix: false, //Not fixed    maxmin: true,
    content: '{:url("yuyue/huayan")}?type=3',
    success:function(layero,index){
    },
    end:function(){
      var handle_status = $("#handle_status").val();
      if ( handle_status == '1' ) {
        ('Added successfully!  ',{
          icon: 1,
          time: 2000 // 2 seconds off (if not configured, the default is 3 seconds)        },function(){
          (0);
        });
      } else if ( handle_status == '2' ) {
        ('Add failed!  ',{
          icon: 2,
          time: 2000 // 2 seconds off (if not configured, the default is 3 seconds)        },function(){
          (0);
        });
      }
    }
  });
 }

The content inside is the jump path. You can use "?parameter=***" to pass the value.

The above method of using the layer modal box to pass values ​​to a new page is all the content I share with you. I hope you can give you a reference and I hope you can support me more.