<!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>
<script type="text/javascript" src="js/index.js"></script>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" />
</head>
<body>
<div data-options="value:60" style="width:400px;">
</div>
</body>
</html>
$(function () { $('#box').progressbar({ width:400, height:30, value:0, text:'{value}%', onChange : function (newValue, oldValue) { //console.log('新:' + newValue + ',旧:' + oldValue); }, }); //定时任务 setTimeout(function () { $('#box').progressbar('setValue', 70); }, 1000); //循环定时任务 美妙进度条的值新增5 setInterval(function () { $('#box').progressbar('setValue', $('#box').progressbar('getValue') + 5); }, 1000); });
//返回属性对象console.log($('#box').progressbar('options'));
//设置组件长度$('#box').progressbar('resize', '500');
//得到组件值alert($('#box').progressbar('getValue'));
//设置组件值$('#box').progressbar('setValue', '80');