php 進(jìn)度條實(shí)現(xiàn)代碼
更新時(shí)間:2009年03月10日 21:40:30 作者:
php 進(jìn)度條實(shí)現(xiàn)代碼,后面都有詳細(xì)的說明。最近的php將會(huì)讓你學(xué)到更多。
復(fù)制代碼 代碼如下:
<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="bar.gif" src="bar.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++) //循環(huán)輸出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++)
{
//為了演示進(jìn)度條的效果,這里執(zhí)行了一個(gè)空循環(huán)
}
flush();
}
?>
相關(guān)文章
php addslashes 函數(shù)詳細(xì)分析說明
PHP 中的 addslashes 函數(shù) addslashes -- 字符串加入斜線。2009-06-06
用PHP調(diào)用數(shù)據(jù)庫的存貯過程!
用PHP調(diào)用數(shù)據(jù)庫的存貯過程!...2006-10-10
在PHP3中實(shí)現(xiàn)SESSION的功能(三)
在PHP3中實(shí)現(xiàn)SESSION的功能(三)...2006-10-10
Mysql的GROUP_CONCAT()函數(shù)使用方法
GROUP_CONCAT語法與實(shí)例代碼2008-03-03

