今天看啥
热点:

最简单的动态进度条,简单动态进度条


1.效果

 

2.源码

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <script type="text/javascript">
        window.onload = function () {
            var myProgress = document.getElementById("myProgress");
            var mySpan = document.getElementById("mySpan");
            var value = myProgress.value;
            mySpan.innerText = value + "%";
            var ID = setInterval(function () {
                value = myProgress.value;
                if (value < 100) {
                    value += 10;
                    myProgress.value = value;
                    mySpan.innerText = value + "%";
                }
                if (value == 100) {
                    clearInterval(ID);
                }
            }, 500);
        }
    </script>
</head>
<body>
<label for="myProgress">进度条</label>
<progress id="myProgress" value="0" max="100"></progress>
<span id="mySpan"></span>
</body>
</html>

 

www.bkjia.comtruehttp://www.bkjia.com/HTML5/1316385.htmlTechArticle最简单的动态进度条,简单动态进度条 1.效果 2.源码 % @ page contentType = " text/html;charset=UTF-8 " language = " java " % html head script type ="text/javascri...

相关文章

    暂无相关文章
相关搜索:

帮客评论

视觉看点