h5安卓物理返回键

if(window.history &&window.history.pushState) {

$(window).on('popstate',function() {

varhashLocation=location.hash;

varhashSplit=hashLocation.split("#!/");

varhashName=hashSplit[1];

if(hashName!=='') {

varhash=window.location.hash;

if(hash==='') {

location.href='你的地址'

}

}

});

window.history.pushState('forward',null,'payment.html?streamCode='+getUrlParam('streamCode')+'&totalPrice='+getUrlParam('totalPrice'));

}

你可能感兴趣的:(h5安卓物理返回键)