랜덤관련 스크립트 알려주세요.
페이지 열릴때 , 지정된 테이블 셀에 바탕색이 랜덤으로 보여지는 그런 소스알려주세요.
검색하다가 지쳐서..
검색하다가 지쳐서..
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 6개
<style>
#randomcell {background-color:rgb(<?=rand(0,255)?>,<?=rand(0,255)?>,<?=rand(0,255)?>)}
</style>
<table>
<tr>
<td id="randomcell">이 셀은 바탕색이 랜덤이라네</td>
<td>여기는 아니라네</td>
</tr>
</table>
스타일로는 힘들겠고 스크립트라도 있으면 알려주세요..
.cell1 {background-color:#FF0;}
.cell2 {background-color:#F0F;}
.cell3 {background-color:#0FF;}
</style>
<table>
<tr>
<td class="cell<?=rand(1,3)?>">랜덤셀</td>
<td class="cell<?=rand(1,3)?>">랜덤셀</td>
<td class="cell<?=rand(1,3)?>">랜덤셀</td>
<td>이건아님</td>
</tr>
</table>
이런건 어때요?
http://gnucomun.net/sp/study.12.1