03进度条

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>进度条</title>
    </head>
    <body>
        <progress value="0" max="100" id="pro"></progress>
        <script>
            var t = 0;
            var pro = document.getElementById('pro');
            function jindu()
            {
                var v = pro.value;
                if(v<100){
                    pro.value+=20;
                }else
                clearInterval(t);
            }
            t=setInterval(jindu,100)
        </script>
    </body>
</html>

 

posted @ 2020-11-26 10:50  卿家尘归尘  阅读(34)  评论(0)    收藏  举报