(1) Close the specific iframe
//When closing itself in the iframe page, the following js script is executed in the iframe page
var index = parent.layer.getFrameIndex(window.name); //get the index of the current iframe layer first
parent.layer.close(index); //then execute close
(2) The parent page passes a reference to the iframe pop-up layer
var collectionId = parent.$(“#hideCollectionId”).val();//you can define the hidden field in the parent page, the id is hideCollectionId, you need to refer to jquery
(3) close all pop-up layers
If there is no complex logic such as pop-up layer stacking, you can close all pop-up layers as needed
layer.closeAll(); //mad mode, close all layers
layer.closeAll(‘dialog’); //close the message box
layer.closeAll(‘page’); //close all page layers
layer.closeAll(‘iframe’); //close all iframe layers
layer.closeAll(‘loading’); //close the loading layer
layer.closeAll(‘tips’); //close all tips layers
Similar Posts:
- Iframe Cross-port Blocked a frame with origin from accessing a cross-origin frame
- [Solved] module ‘keras.engine.topology’ has no attribute ‘load_weights_from_hdf5_group_by_name…
- The difference between Top.location and window.location.href
- [Solved] Error: loading chunk * failed, Vue router lazy loading error
- Four ways to solve selenium’s error “element is not clickable at point…”
- Error: loading chunk * failed, Vue router lazy loading error problem solution
- A parser-blocking, cross site (i.e. different eTLD+1) script, is invoked via document.write
- The Usage of v-clock
- window.location And window.open The difference between
- This content should also be served over HTTPS