【发布时间】:2012-05-14 01:28:39
【问题描述】:
可能重复:
How to customize (or disable) the automatic “back” button in JQueryMobile
您好,我正在尝试为我的要求开发一个移动网页
用户首先从页面A转到页面B,然后他不能通过点击浏览器的后退按钮回到页面B。
【问题讨论】:
标签: jquery jquery-mobile
可能重复:
How to customize (or disable) the automatic “back” button in JQueryMobile
您好,我正在尝试为我的要求开发一个移动网页
用户首先从页面A转到页面B,然后他不能通过点击浏览器的后退按钮回到页面B。
【问题讨论】:
标签: jquery jquery-mobile
如果你想防止使用浏览器返回按钮返回上一页,你可以使用这个代码sn-p
<head>
<script type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</script>
</head>
<body onload="noBack();"
onpageshow="if (event.persisted) noBack();" onunload="">
实际来源-http://viralpatel.net/blogs/2009/11/disable-back-button-browser-javascript.html
【讨论】: