<u>复制代码</u> 代码如下:<br> <br> <br> <br> <br><table width="400" border="0" cellspacing="1" cellpadding="1"> <br><tr> <br><td bgcolor="000000"> <br><table width="400" border="0" cellspacing="0" cellpadding="1"> <br><tr> <br><td bgcolor="ffffff"> <br><img src="bar.gif" style="max-width:90%" style="max-width:90%" id="percent_img" name="percent_img" align="absmiddle" alt="php 进度条实现代码_PHP" > <br> </td> <br> </tr> <br> </table> <br> </td> <br><td> <br><span id="percent_txt" name="percent_txt">0%</span> <br> </td> <br> </tr> <br> </table> <br> <br> <br><?php <BR>flush(); <br>for($i=0;$i{ <br>$width = $i * 4; <br>echo "<script>"; <BR>echo "percent_img.width=$width;"; //控制图片宽度 <BR>echo "percent_txt.innerHTML='$i%';"; //控制百分比显示 <BR>echo "</script>"; <br>for($j=0;$j{ <br>//为了演示进度条的效果,这里执行了一个空循环 <br>} <br>flush(); <br>} <br>?><br>