我想在layer出现前刷新下网页,
//window.location.href = "?comp="+text;
window.history.pushState("","","?comp="+text);
history.go(0);
layer.open(
{
type:1
,offset: type //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,id: 'layerDemo'+type //防止重复弹出
,content: '<div style="padding: 20px 100px;">'+ text + document.getElementById('code').innerHTML+'</div>'
,btn: '关闭'
,btnAlign: 'c' //按钮居中
,shade: 0 //不显示遮罩
,yes: function(){
layer.closeAll();
}
});
如上,这么写刷新的时候把弹窗也刷没了,该怎么解决啊