| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
高端软件开发 = 年薪十万不是梦赛孚耐:软件保护加密专家身份认证令牌USB KEY 
共有 633 人关注过本帖
标题:我运行时,颜色不会变换,求助
收藏  订阅  推荐  打印 
casual0402
Rank: 1
等级:新手上路
帖子:23
积分:344
注册:2008-5-11
我运行时,颜色不会变换,求助

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<body>
<?php
function tablebgcolor(){
    static $bgcolor;
    if ($bgcolor = "00ffff")
    {
        $bgcolor = "ffff00";
    }
    else { $bgcolor = "00ffff"; }
    return ($bgcolor);
}
echo '<table border=1><br>';
for ($i = 1; $i <= 10; $i++){
    $bgcolor = tablebgcolor();
    echo '<tr><td bgcolor = '.$bgcolor.'>this the '.$i.' line</td></tr><br>';
}
echo '</table>';
?>
</body>
</html>
搜索更多相关主题的帖子: quot  bgcolor  DTD  颜色  head  
2008-5-27 13:03
casual0402
Rank: 1
等级:新手上路
帖子:23
积分:344
注册:2008-5-11

顶一个
2008-5-27 16:05
casual0402
Rank: 1
等级:新手上路
帖子:23
积分:344
注册:2008-5-11

搞定了 呵呵
2008-5-27 16:15
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.050974 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved