I am doing an online quiz app in php.(我正在用php做一个在线测验应用程序。)
I want to restrict the user from going back in an exam.(我想限制用户再次参加考试。) I have tried the following script but it stops my timer.(我尝试了以下脚本,但它停止了我的计时器。) What should I do?(我该怎么办?)
I have included the source code.(我已经包含了源代码。) The timer is stored in cdtimer.js(计时器存储在cdtimer.js中)
<script type="text/javascript">
window.history.forward();
function noBack()
{
window.history.forward();
}
</script>
<body onLoad="noBack();" onpageshow="if (event.persisted) noBack();" onUnload="">
I have the exam timer which takes a duration for the exam from a mysql value.(我有考试计时器,该计时器从mysql值中获取考试时间。) The timer starts accordingly but it stops when I put the code in for disabling the back button.(计时器相应地启动,但是当我放入用于禁用后退按钮的代码时,计时器停止。) What is my problem?(我怎么了)
ask by Sawant Akshay translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…