<?php
// Dummy function just to provide an example
Yii::app()->clientScript->registerScript('scriptId', "
var count = 0;
var step = 10;
var speed = 500;
function progress() {
$('#amount').text(count+'%');
$('#progress').progressbar('option', 'value', count);
if(count < 100) {
count = count+step;
setTimeout(progress, speed);
}
}
progress();
", CClientScript::POS_LOAD);
?>
<h2><?php echo 'Progressbar';?></h2>
<?php
$this->widget('zii.widgets.jui.CJuiProgressBar', array(
'id'=>'progress',
'value'=>0,
'htmlOptions'=>array(
'style'=>'width:200px; height:20px; float:left;'
),
));
?>
<div id="amount" style="margin-left:210px; padding:3px;"></div>
Yii CJuiProgressBar进度条的操作
最新推荐文章于 2020-01-13 15:17:11 发布