[etc] 라디오 버튼의 이미지화 토클
페이지 정보
본문
<input type="radio" name="wr_3" style="display:none" value="1">
<input type="radio" name="wr_3" style="display:none" value="2">
<input type="radio" name="wr_3" style="display:none" value="3">
<script>
function setImageRadio(){
document.getElementById('img0').src=
(document.getElementsByName('wr_3')[0].checked==true)?"<?=$board_skin_path?>/img/chan_on.gif":"<?=$board_skin_path?>/img/chan.gif";
document.getElementById('img1').src=
(document.getElementsByName('wr_3')[1].checked==true)?"<?=$board_skin_path?>/img/ban_on.gif":"<?=$board_skin_path?>/img/ban.gif";
document.getElementById('img2').src=
(document.getElementsByName('wr_3')[2].checked==true)?"<?=$board_skin_path?>/img/jung_on.gif":"<?=$board_skin_path?>/img/jung.gif";
}
</script>
<IMG SRC="<?=$board_skin_path?>/img/<?if ($write[wr_3]==1){ echo 'chan_on.gif';}else echo'chan.gif';?>" ALT="" id="img0"
onClick="document.getElementsByName('wr_3')[0].checked=true; setImageRadio();">
<IMG SRC="<?=$board_skin_path?>/img/<?if ($write[wr_3]==2){ echo 'ban_on.gif';}else echo'ban.gif';?>" ALT="" id="img1"
onClick="document.getElementsByName('wr_3')[1].checked=true; setImageRadio();">
<IMG SRC="<?=$board_skin_path?>/img/<?if ($write[wr_3]==3){ echo 'jung_on.gif';}else echo'jung.gif';?>" ALT="" id="img2"
onClick="document.getElementsByName('wr_3')[2].checked=true; setImageRadio();">
<input type="radio" name="wr_3" style="display:none" value="2">
<input type="radio" name="wr_3" style="display:none" value="3">
<script>
function setImageRadio(){
document.getElementById('img0').src=
(document.getElementsByName('wr_3')[0].checked==true)?"<?=$board_skin_path?>/img/chan_on.gif":"<?=$board_skin_path?>/img/chan.gif";
document.getElementById('img1').src=
(document.getElementsByName('wr_3')[1].checked==true)?"<?=$board_skin_path?>/img/ban_on.gif":"<?=$board_skin_path?>/img/ban.gif";
document.getElementById('img2').src=
(document.getElementsByName('wr_3')[2].checked==true)?"<?=$board_skin_path?>/img/jung_on.gif":"<?=$board_skin_path?>/img/jung.gif";
}
</script>
<IMG SRC="<?=$board_skin_path?>/img/<?if ($write[wr_3]==1){ echo 'chan_on.gif';}else echo'chan.gif';?>" ALT="" id="img0"
onClick="document.getElementsByName('wr_3')[0].checked=true; setImageRadio();">
<IMG SRC="<?=$board_skin_path?>/img/<?if ($write[wr_3]==2){ echo 'ban_on.gif';}else echo'ban.gif';?>" ALT="" id="img1"
onClick="document.getElementsByName('wr_3')[1].checked=true; setImageRadio();">
<IMG SRC="<?=$board_skin_path?>/img/<?if ($write[wr_3]==3){ echo 'jung_on.gif';}else echo'jung.gif';?>" ALT="" id="img2"
onClick="document.getElementsByName('wr_3')[2].checked=true; setImageRadio();">
추천0