如何用js显示一个3分钟的倒计时

想实现这样一个效果 在页面的某 区域内显示一个3分钟的倒计时 然后在输出一个指定的5位数 同时显示这个效果后不能影响页面的其他内容

脚本说明:
把如下代码加入区域中

<!-- Begin
// Take user here after session timed out
timedouturl = "http://www.k688.com";

function Minutes(data) {
for (var i = 0; i < data.length; i++)
if (data.substring(i, i + 1......
答案就在这里:js倒计时显示
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

怎么格式变成这样了...

<!doctype html>







Document




//var now = new Date(); var i=10 setInterval("countDown();",1000); function countDown(){ --i; if(i==0){ document.getElementById("_txt").disabled=false; alert("type your word "); } }
 <!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  <input id="_txt" name="_txt" maxlength=5 disabled />
 </body>
</html>
<script type="text/javascript">

    //var now = new Date();
    var i=10
    setInterval("countDown();",1000);

  function countDown(){
    --i;
    if(i==0){
      document.getElementById("_txt").disabled=false;
      alert("type your word ");
    }
  }
</script>

javascript计时器
javascript生成随机数