The simplest layer pop-up window traditional values issue!

 $.ajax({
                         type:'get',
                         url:'http://localhost:3000/books/book/'+id,
                         data:{},
                         dataType:'json',
                         success:function(result){
                            window.data=result
                            layer.open({
                                  type: 2,
                                  data:1111,
                                 content: 'editBook.html',
                                  area: ['320px', '195px'],
                                  maxmin: false
                                })
                         }

                     })

Top is the parent page

 

The following is a sub-page

 var data = parent.data;
 console.log(data)

 

It is not that simple url

Guess you like

Origin www.cnblogs.com/hack-ing/p/12153659.html