<?php function randColor(){ $letters = "1234567890ABCDEF"; for($i=1;$i<6;$i++){ $pos = rand(0,16); $str .= $string{$pos}; } return "#".$str; } echo '<span style="color:'.randColor().'">Random Color Text</span>'; ?>
2018-04-13 10:14:16 浏览() 来源:http://www.phpdaima.com//jsfx-45.html 评论 ( 0 )
<?php function randColor(){ $letters = "1234567890ABCDEF"; for($i=1;$i<6;$i++){ $pos = rand(0,16); $str .= $string{$pos}; } return "#".$str; } echo '<span style="color:'.randColor().'">Random Color Text</span>'; ?>