The principle of not being able to roll back is to prevent it from generating historical records.
Methods as below:
1: Define the method.
<script>
// 跳转页面,且浏览器不能回退到上一级
function skip() {
window.location.replace('目标地址')
}
</script>
2: How to use, take button as an example.
<button onclick="skip()">跳转</button>
3: Success.