1, on a return visit address (page)
window.history.back();
2, return to the previous access address (page), while the refresh operation
window.location = document.referrer;
3. Click on the link to open a new window in the form of (window), and before the new window refresh a window (page)
// 刷新前一个窗口内容
window.opener.location.reload();
// 关闭本窗口
self.close();
4. Click iframe pop-layer layer layer to open
// 刷新指定名称(iframe5)的iframe
top.window['iframe5'].frames.location.reload();
// 刷新当前页面
window.location.reload();
// 刷新父亲对象(用于框架)
parent.location.reload();
// 刷新最顶端对象(用于多开窗口)
top.location.reload();
// 关闭当前弹层
var index = parent.layer.getFrameIndex(window.name);
setTimeout(function(){
parent.layer.close(index)
}, 1000);
// 关闭当前弹层
layer.close();
// 关闭所有弹层
window.parent.layer.closeAll();
5, the current value of the name attribute acquiring the iframe
// 获取当前iframe的name属性值
var index = parent.layer.getFrameIndex(window.name);
var iframeName = 'layui-layer-iframe'+index;
6, according to obtain an iframe iframe object name
// 根据名字(name)获取iframe对象
window.parent.document.getElementsByName('iframe40')[0].contentWindow
// 调用指定iframe对象的方法
window.parent.document.getElementsByName('iframe40')[0].contentWindow.sortOrRefresh();
7, access to the current value of the id attribute of the iframe
var iframeId = self.frameElement.getAttribute('id');
8, according to the iframe object ID acquiring the iframe
var iframe = top.document.getElementById('${iframeId}').contentWindow;
var isAutoCheck = iframe.$("input:radio[name='isAutoCheck']:checked").val();