html部分:
<div class="go" style="" onclick="hideGofunc()">
<div class="gocenter"> <img src="/newpages/html/3506/temp/go.png" /></div>
</div>
js部分
function hideGofunc() {
$(".go").css("display","none");
}
$(function(){
pushHistory();
var noback = true;
window.addEventListener("popstate", function(e) {//监听返回按钮
if ( noback ) {
$(".go").css("display","block");
noback = false
// //根据自己的需求实现自己的功能
} else {
window.history.go(-1);
}
}, false);
function pushHistory() {
var state = {
title: "title",
url: "#"
};
window.history.pushState(state, "title", "#");
}
});