<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_58751"> <div class="blockcode"> <div id="code_qEl"><ol> <li>function randomColor() { </li> <li> $str = '#'; </li> <li> for($i = 0 ; $i $randNum = rand(0 , 15); </li> <li> switch ($randNum) { </li> <li> case 10: $randNum = 'A'; break; </li> <li> case 11: $randNum = 'B'; break; </li> <li> case 12: $randNum = 'C'; break; </li> <li> case 13: $randNum = 'D'; break; </li> <li> case 14: $randNum = 'E'; break; </li> <li> case 15: $randNum = 'F'; break; </li> <li> } </li> <li> $str .= $randNum; </li> <li> } </li> <li> return $str; </li> <li>} </li> <li>$color = randomColor();</li> </ol></div> <em onclick="copycode($('code_qEl'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> PHP</div> <div id="comment_58751" class="cm"> </div> <div id="post_rate_div_58751"></div> <br><br>