当前位置: 首页 > 图文教程 > 网络编程 > PHP > php 进度条实现代码

PHP
在PHP中使用模板的方法
php中iconv函数使用方法
谈谈新手如何学习PHP网络编程
JS实现php的伪分页
需要使用php模板的朋友必看的很多个顶级PHP模板引擎比较分析
五个PHP程序员工具
CodeIgniter php mvc框架 中国网站
php mysql数据库操作类
php MySQL与分页效率
WindowsXP中快速配置Apache+PHP5+Mysql
php创建多级目录代码
php中对xml读取的相关函数的介绍一
Excel数据导入Mysql数据库的实现代码
比较全的PHP 会话(session 时间设定)使用入门代码
快速配置PHPMyAdmin方法
MySQL数据源表结构图示
改变Apache端口等配置修改方法
PHP读取MySQL数据代码
详解PHP显示MySQL数据的三种方法
PHP中Date获取时间不正确怎么办

PHP 中的 php 进度条实现代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 186 ::
收藏到网摘: n/a

php 进度条实现代码,后面都有详细的说明。最近的php将会让你学到更多。
复制代码 代码如下:

<html>
<head>
</head>
<body>
<table width="400" border="0" cellspacing="1" cellpadding="1">
<tr>
<td bgcolor="000000">
<table width="400" border="0" cellspacing="0" cellpadding="1">
<tr>
<td bgcolor="ffffff">
<img src="/upload/tech/20091012/20091012020828_d9d4f495e875a2e075a1a4a6e1b9770f.gif" src="/upload/tech/20091012/20091012020828_d9d4f495e875a2e075a1a4a6e1b9770f.gif" width="0" height="16" id="percent_img" name="percent_img" align="absmiddle">
</td>
</tr>
</table>
</td>
<td>
<span id="percent_txt" name="percent_txt">0%</span>
</td>
</tr>
</table>
</body>
</html>
<?php
flush();
for($i=0;$i<=100;$i++) //循环输出100次JavaScript代码
{
$width = $i * 4;
echo "<SCRIPT>";
echo "percent_img.width=$width;"; //控制图片宽度
echo "percent_txt.innerHTML='$i%';"; //控制百分比显示
echo "</SCRIPT>";
for($j=0;$j<1000000;$j++)
{
//为了演示进度条的效果,这里执行了一个空循环
}
flush();
}
?>