主题:为什么颜色变换不了呢?
<!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>
"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>