jq判断是否点击返回,回到上一页
<script> window.addEventListener('pageshow', function (event) { if(event.persisted || window.performance && window.performance.navigation.type == 2){ // 返回2则是点击返回 console.log('window.performance.navigation.type: '+ window.performance.navigation.type) // location.refresh(); //此处可以写你的实际应用的代码 } },false); </script>