Mui- 进度条
Posted fdxjava
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mui- 进度条相关的知识,希望对你有一定的参考价值。
<!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- 进度条的主要内容,如果未能解决你的问题,请参考以下文章