$.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