jQuery Easy UI ProgressBar(進度條)組件

來源:互聯網
上載者:User

標籤:jquery   ui   progressbar   進度條   

ProgressBar(進度條)組件,這個還是挺好玩的,我們在自己做點什麼的時候經常能用到,比如上傳下載檔案、匯入匯出文檔啊、載入網頁等等。

應用情境很多,使用起來還很簡單。

樣本:

<!DOCTYPE html><html><head><title>jQuery Easy UI</title><meta charset="UTF-8" /><script type="text/javascript" src="easyui/jquery.min.js"></script><script type="text/javascript" src="easyui/jquery.easyui.min.js"></script><script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js" ></script><link rel="stylesheet" type="text/css" href="easyui/themes/bootstrap/easyui.css" /><link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" /><script>$(function () {//$.fn.progressbar.defaults.value = 30;//想要修改進度條的顏色去css檔案中去修改$('#box').progressbar({width : 200,//設定進度條寬度 預設400height : 15,//設定進度條高度 預設22value : 0,//設定進度條值 預設0text : '{value}%',//設定進度條百分比模板 預設 {value}%//在value改變的時候觸發onChange : function (newValue, oldValue) {console.log('新:' + newValue + ',舊:' + oldValue);},});/*setTimeout(function () {$('#box').progressbar('setValue', 70);}, 1000);*/setInterval(function () {//getValue  setValue 分別是返回當前進度值  和 設定一個進度值$('#box').progressbar('setValue', $('#box').progressbar('getValue') + 5);}, 1000);console.log($('#box').progressbar('options'));//$('#box').progressbar('resize', 80);沒啥大用});</script></head><body style="margin:100px;"><!--<div class="easyui-progressbar" data-options="value:60" style="width:400px"></div>--><div id="box"  ></div></body></html>
執行效果:



點擊下載原始碼

jQuery Easy UI ProgressBar(進度條)組件

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.