ifream page popup masking layer overlying the parent page

1. First, find the page on the child id mask layer,

2. The parent page and then write a method js

. 1  function Shade () {
 2          $ ( "layui-Layer-Shade.") Height ($ (window) .height ()) width ($ (window) .width ());.. // make mask BACKGROUND covering the entire page 
3      }
View Code

3. The page calls js method of the parent page in the sub

// delete 
function delObj (url, name) {
parent.shade (); // call the method js parent page
parent.layer.confirm (, { 'confirm delete this record it?'
Btn: [ 'OK', ' cancel '] // button
}, function (index) {
parent.layer.close (index); // close the pop-up, which is to be placed, must use parent
$ .ajax ({
URL: URL,
type:' the GET ',
dataType:' JSON ',
Cache: to false,
Success: function (Data) {
IF (data.success) {
var MSG = data.msg;
Tip (MSG, 1); // icon set to 1 indicates a green the check mark icon
reloadTable ();
. $ // parent ( "layui-Layer-Shade.") hide ();.
} the else {
Tip (data.msg);
}
}
});

}, function () {
});
}

Guess you like

Origin www.cnblogs.com/woshishanshan/p/10932173.html