<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
    <script language=javascript>
    function ShowTime(tc,tp)
    {
        var el = document.getElementById("showTime");
        if(tc>0)
        {
           
            el.innerHTML = "还有"+tc+"秒钟";
            setTimeout("ShowTime("+(tc-tp)+","+tp+")",tp*1000);
        }
        else
        {
            el.innerHTML = "";
        }
    }
    </script>
</head>
<body>
<div id="showTime" ></div>
    <input id="Button1" type="button" value="button" />
</body>
</html>
<script  type="text/javascript">
ShowTime(5,1);</script>