Home >Backend Development >PHP Tutorial >PHP progress bar implementation code_PHP tutorial

PHP progress bar implementation code_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:47:39805browse

复制代码 代码如下:



















0%



flush();
for($i=0;$i<=100;$i++) //循环输出100次JavaScript代码
{
$width = $i * 4;
echo "<SCRIPT>"; <br>echo "percent_img.width=$width;"; //控制图片宽度 <br>echo "percent_txt.innerHTML='$i%';"; //控制百分比显示 <br>echo "</SCRIPT>";
for($j=0;$j<1000000;$j++)
{
//为了演示进度条的效果,这里执行了一个空循环
}
flush();
}
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/319918.htmlTechArticle复制代码 代码如下: html head /head body table width="400" border="0" cellspacing="1" cellpadding="1" tr td bgcolor="000000" table width="400" border="0" cellspacing="0" cel...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn