jQuery EasyUI ProgressBar進度條組件
更新時間:2017年02月28日 17:18:52 作者:hai_cheng001
這篇文章主要為大家詳細介紹了jQuery EasyUI ProgressBar進度條組件的相關(guān)資料,具有一定的參考價值,感興趣的小伙伴們可以參考一下
ProgressBar(進度條)組件,這個還是挺好玩的,我們在自己做點什么的時候經(jīng)常能用到,比如上傳下載文件、導(dǎo)入導(dǎo)出文檔啊、載入網(wǎng)頁等等。
應(yīng)用場景很多,使用起來還很簡單。
示例:
<!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" rel="external nofollow" />
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" rel="external nofollow" />
<script>
$(function () {
//$.fn.progressbar.defaults.value = 30;
//想要修改進度條的顏色去css文件中去修改
$('#box').progressbar({
width : 200, //設(shè)置進度條寬度 默認400
height : 15, //設(shè)置進度條高度 默認22
value : 0, //設(shè)置進度條值 默認0
text : '{value}%', //設(shè)置進度條百分比模板 默認 {value}%
//在value改變的時候觸發(fā)
onChange : function (newValue, oldValue) {
console.log('新:' + newValue + ',舊:' + oldValue);
},
});
/*
setTimeout(function () {
$('#box').progressbar('setValue', 70);
}, 1000);
*/
setInterval(function () {
//getValue setValue 分別是返回當前進度值 和 設(shè)置一個進度值
$('#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>
執(zhí)行效果:

點擊下載源代碼:jQuery ProgressBar進度條組件
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
您可能感興趣的文章:
- jQuery EasyUI API 中文文檔 - ProgressBar 進度條
- Jquery Easyui進度條組件Progress使用詳解(8)
- jquery 簡單的進度條實現(xiàn)代碼
- 6款新穎的jQuery和CSS3進度條插件推薦
- 分享8款優(yōu)秀的 jQuery 加載動畫和進度條插件
- 基于HTML5 Ajax文件上傳進度條如何實現(xiàn)(jquery版本)
- Javascript jquery css 寫的簡單進度條控件
- jQuery實現(xiàn)文件上傳進度條特效
- Jquery進度條插件 Progress Bar小問題解決
- jQuery監(jiān)聽文件上傳實現(xiàn)進度條效果的方法
- jQuery簡單實現(xiàn)提交數(shù)據(jù)出現(xiàn)loading進度條的方法
- jquery-ui 進度條功能示例【測試可用】
相關(guān)文章
在jquery中的ajax方法怎樣通過JSONP進行遠程調(diào)用
這一節(jié)主要演示下在JQUERY中的ajax方法怎樣通過JSONP進行遠程調(diào)用,需要的朋友可以參考下2014-04-04
jquery實現(xiàn)不同大小瀏覽器使用不同的css樣式表的方法
這篇文章主要介紹了jquery實現(xiàn)不同大小瀏覽器使用不同的css樣式表的方法,需要的朋友可以參考下2014-04-04

