码迷,mamicode.com
首页 > 其他好文 > 详细

Mui- 进度条

时间:2019-06-23 17:25:54      阅读:272      评论:0      收藏:0      [点我收藏+]

标签:top   view   导航   cli   put   ice   int   device   展现   

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        <script src="js/mui.min.js"></script>
        <link href="css/mui.min.css" rel="stylesheet" />
        <script type="text/javascript" charset="utf-8">
            mui.init();
        </script>

    </head>

    <body>
        <header class="mui-bar mui-bar-nav">
            <!--顶部导航栏-带返回键-->
            <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">测试属性</h1>
        </header>
        <div class="mui-content">
            <div style="padding: 20px;"><!--为了更好的显示,外层加一个div边距-->
                <div id="demo1" class="mui-progressbar">
                    <span></span>
                </div>
            </div>
            <div style="padding: 0px 20px;">
                <button type="button" onclick="setPro();">展现进度条</button>
            </div>
        </div>
        <script type="text/javascript">
            function setPro(){
                /*动画效果*/
                var obj = mui(#demo1);
                var bl = 0;
                setInterval(function(){
                    obj.progressbar({progress:bl}).show();
                    bl+=10;
                },1000);
                /*mui(‘#demo1‘).progressbar({progress:50}).show();*/
            }
        </script>
    </body>

</html>

技术图片

---获取滑块的值

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        <script src="js/mui.min.js"></script>
        <link href="css/mui.min.css" rel="stylesheet" />
        <script type="text/javascript" charset="utf-8">
            mui.init();
        </script>

    </head>

    <body>
        <header class="mui-bar mui-bar-nav">
            <!--顶部导航栏-带返回键-->
            <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">测试属性</h1>
        </header>
        <div class="mui-content">
            <div style="padding: 20px;padding-top: 80px;">
                <div class="mui-input-row mui-input-range">
                <label>Range</label>
                <input type="range" min="0" max="100" id="range1">
            </div>
            </div>
            <div style="padding: 0px 20px;">
                <button type="button" onclick="getV();">获取滑块的值</button>
            </div>
        </div>
        <script type="text/javascript">
            function getV(){
                var obj = mui(#range1);
                var val = obj[0].value;/*获取dao节点为0的*/
                mui.toast(val);
            }
        </script>
    </body>

</html>

 

Mui- 进度条

标签:top   view   导航   cli   put   ice   int   device   展现   

原文地址:https://www.cnblogs.com/fdxjava/p/11073360.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!