我試圖在排序,奇怪,甚至有不同的顏色更容易閱讀。表格tr背景顏色變化
這裏是我的代碼:
$show_res = mysql_query($show_query);
while ($show_row = mysql_fetch_assoc($show_res)){
$rc++;
if (($rc > 1)){
$tr = '#cccccc';
} else {
$tr = '#ffffff';
}?>
<tr style="background-color:<?php echo $tr ;?>">
它不工作,我失去的東西嗎?
感謝您的幫助
http://stackoverflow.com/questions/5958471/alternating-table-row-background-colors-on-a-dynamic-table – alexantd
什麼瀏覽器是否在使用? – Jrod
你還有別的東西會設置背景顏色嗎?像TD元素一樣?要麼? – Steven