<body>
    <input type="text" readonly="true" value="10" id="time">
</body>
<script language="javascript"> var t = 60;//60个1秒 var time = document.getElementById("time"); function fun(){ t--; time.value = t; if(t<=0){ window.location = "PostTestController.action?testId=" + testId; //提交 clearInterval(inter); } } var inter = setInterval("fun()",1000); //1000毫秒=1秒 </script>

 

相关文章:

  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案