下一篇 » « 上一篇

Figure 18-2: Dressing up CGI Output

作者:semirock    时间:2009-07-02    来源:http://444p.com    点击:23681    本文共1篇文章 字体:[ ]

Figure 18-2: Dressing up CGI Output

<HTML>
<HEAD>
<TITLE>Figure 18-2</TITLE>
</HEAD>

<BODY>
<H1>Color Chart</H1>
<P>The following chart displays the colors
safe for displaying in all browsers. These
colors should not dither on any computer
with a color palette of at least 256
colors.</P>
<P>This chart will only display on browsers
that support table cell background colors.</P>
<?
$color = array("00", "33", "66", "99", "CC", "FF");

for($Red = 0; $Red < count($color); $Red++)
{
print("<TABLE>\n");

for($Green = 0; $Green < count($color); $Green++)
{
print("<TR>\n");

for($Blue = 0; $Blue < count($color); $Blue++)
{
$CellColor = $color[$Red] .
$color[$Green] . $color[$Blue]; php学习之家

print("<TD BGCOLOR=\"#$CellColor\">");
print("<TT>$CellColor</TT>");
print("</TD>\n");
}

print("</TR>\n");
}

print("</TABLE>\n");
}
?>
</BODY>

</HTML>
责任编辑:semirock
发表评论
密码: (游客不需要密码)
记住我【Alt+S 或 Ctrl+Enter 快速提交】

搜索工具


《PHP函数》点击排行