js网页拦截物联返回键跳转到指定页面
<script type="text/javascript">$(document).ready(function () {if (window.history && window.history.pushState) {$(window).on('popstate', function () {var hashLocation = location.hash;var hashSplit = hashLocation.split("#!/");var hashName = hashSplit[1];if (hashName !== '') {var hash = window.location.hash;var sy_url = "{$article['sy_url']}";if (hash === '' && (sy_url != null && sy_url != '')) {window.location.href = sy_url;}}});}window.history.pushState('forward', null, '#'); //在IE中必须得有这两行window.history.forward(1);});</script>