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

PHP
include()与require()的对比
php和asp对象的等价关系
PHP, JScript 和 VBScript 函数和类的语法
PHP:MVC迷思
PHP脚本的8个技巧(1)
PHP脚本的8个技巧(2)
PHP脚本的8个技巧(3)
PHP脚本的8个技巧(4)
PHP脚本的8个技巧(5)
PHP脚本的8个技巧(6)
PHP脚本的8个技巧(7)
PHP脚本的8个技巧(8)
PHP教程.经验技巧(上)
递归列出所有文件和目录
PHP的历史和优缺点
PHP下MAIL的另一解决方案
PHP文本数据库的搜索方法
PHP调用三种数据库的方法(1)
PHP调用三种数据库的方法(2)
PHP调用三种数据库的方法(3)

PHP 中的 php 进度条实现代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 72 ::
收藏到网摘: 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();
}
?>