• 首页
  • 电影
  • Js
  • 前端
  • 新旅
  • 奇技
  • 网安
  • 歌单
  • 关于
  • 搜索
  • 夜间模式
    ©2013-2025  成长小破站 Theme by OneBlog
    搜索
    标签
    # css # js # uniapp # ps # chrome # 小程序 # javascript # 布局 # typecho # 激活码
  • 首页>
  • 前端笔记>
  • 正文
  • html5 progress

    2015年12月23日 1.4 k 阅读 0 评论 738 字

                <section>
                    <h2>进度 Progress</h2>
                    <p>进度: <progress id="p" value="0" max=100><span>0</span>%</progress></p>
                    <script>
                    
                    window.onload=function(){
                        var progressBar = document.getElementById('p');
                    var newValue=0;
                            function updateProgress() {
                    newValue+=10;
                        progressBar.value = newValue;
                                            console.log(newValue);
                    progressBar.getElementsByTagName('span')[0].textContent = newValue;
                    if(newValue=="100"){
                    
                    
                    clearInterval(up)
                    }
                    
                    }
                            var up = window.setInterval(updateProgress, 500);
                    }
                        
                    </script>
                </section>
    本文著作权归作者 [ admin ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ 互联网 ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。
    html5 progress
    取消回复

    发表留言
    回复

    首页电影Js前端新旅奇技网安歌单关于
    Copyright©2013-2025  All Rights Reserved.  Load:0.032 s
    豫公网安备41050202000235   豫ICP备18019224号-2
    Theme by OneBlog V3.6.4
    夜间模式

    开源不易,请尊重作者版权,保留基本的版权信息。