PHP development framework YiiFramework tutorial (38) Zii component-ProgressBar example

Source: Internet
Author: User
PHP development framework YiiFramework tutorial (38) Zii component-ProgressBar example

CJuiProgressBar displays a progress bar. It encapsulates the JUI Progressbar plug-in. CJuiProgressBar displays a progress bar. It encapsulates the JUI Progressbar plug-in.

Widget ('zii. widgets. jui. cjuiprogressbar', array (
'Id' => 'progress ',
'Value' => 0,
'Htmlopexception' => array (
'Style' => 'width: 200px; height: 20px; float: left ;'
),
));
?>

To demonstrate the progress bar, we use JavaScripts to change the current value of the progress bar and use a text to display the value of the current progress bar.

// 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 + '% ');
$ ('# SS SS'). progressbar ('option', 'value', count );
If (count <100 ){
Count = count + step;
SetTimeout (progress, speed );
}
}
Progress ();
", CClientScript: POS_LOAD );
?>
...


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.