easyui 进度条(ProgressBar)

来源:互联网 发布:安卓微信自动回复软件 编辑:程序博客网 时间:2024/05/17 07:39

Create ProgressBar

The ProgressBar component can be created from html markup or programatically. Creation from markup is even easier. Add 'easyui-progressbar' class to <div/> markup.

  1. <div id="p" class="easyui-progressbar" style="width:400px;"></div>  

Get or Set Value

We get the current value and set a new value for this component.

  1. var value = $('#p').progressbar('getValue');  
  2. if (value < 100){  
  3.     value += Math.floor(Math.random() * 10);  
  4.     $('#p').progressbar('setValue', value);  
  5. }  


Properties

NameTypeDescriptionDefaultwidthstringSet the progressbar width.autovaluenumberThe percentage value.0textstringThe text template to be displayed on component.{value}%

Events

NameParametersDescriptiononChangenewValue,oldValueFires when the value is changed.

Methods

NameParameterDescriptionoptionsnoneReturn the options object.resizewidthResize the component.getValuenoneReturn the current progress value.setValuevalueSet a new progress value.