$(function(){
pushHistory();
window
.addEventListener("popstate", function(e
) {
WeixinJSBridge
.call('closeWindow');
if(typeof(WeixinJSBridge
)!="undefined"){
WeixinJSBridge
.call('closeWindow');
}else{
if (navigator
.userAgent
.indexOf("MSIE") > 0) {
if (navigator
.userAgent
.indexOf("MSIE 6.0") > 0) {
window
.opener
= null; window
.close();
}
else {
window
.open('', '_top'); window
.top
.close();
}
}
else if (navigator
.userAgent
.indexOf("Firefox") > 0) {
window
.location
.href
= 'about:blank ';
}
else {
window
.opener
= null;
window
.open('', '_self', '');
window
.close();
}
}
}, false);
window
.onbeforeunload = function() {
return;
}
function pushHistory() {
var state
= {
title
: "title",
url
: ""
};
window
.history
.pushState(state
, "title", "");
}
});
转载请注明原文地址: https://www.6miu.com/read-5031283.html