checkbox³ª radio ´ÜÃß°¡ µðÆúÆ®·Î ¼±ÅõǾî Àִ°¡ÀÇ »óŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ºÎ¿ï°ª)
¼Ó¼º°ªÀº checkbox³ª radio ´ÜÃß°¡ µðÆúÆ®·Î ¼±ÅõǴ°¡¸¦ ³ªÅ¸³»´Â ºÎ¿ï°ªÀÌ´Ù.

false Á¦¾î°¡ µðÆúÆ®·Î ¼±ÅõÇÁö ¾Ê´Â´Ù.
true µðÆúÆ®À̸ç, Á¦¾î°¡ µðÆúÆ®·Î ¼±ÅõȴÙ.

ÀÌ ¼Ó¼ºÀº Àбâ/¾²±â·Î µðÆúÆ®°ªÀº trueÀÌ´Ù.

Ư±â

ÀÌ ¼Ó¼º°ªÀº ÇÁ·Î±×·¥À¸·Î º¯°æ½Ãų ¼ö ÀÖÀ¸³ª checkbox³ª radioÀÇ ¸ð¾çÀ̳ª ¼Û½ÅµÇ´Â ¹æ½Ä¿¡´Â º¯È­°¡ ¾ø´Ù.

Àû¿ë
°³Ã¼scriptHTML±Ô°ÝIE
Âü°í
checked

ÀÌ ¼Ó¼ºÀº (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼­ Á¤ÀǵǾú´Ù.


¼Ó¼º »óÅ º¸±â : À̹ÌÁö Ç¥½Ã :
°á°ú Ç¥½Ãâ
¼Ó¼º »óÅ º¸±â : <INPUT id=chkObj1 type="radio" name="rdo" onclick=doPlay()>
À̹ÌÁö Ç¥½Ã : <INPUT id=chkObj2  type="radio" name="rdo" onclick=doPlay()> <SPAN id="imgA"></SPAN>
<DIV id="showA" style="width:400;border:solid 1 blue;padding:5">°á°ú Ç¥½Ãâ</DIV>
<SCRIPT>
chkObj1.defaultChecked=chkObj1.checked=true;
document.onload=doPlay();
function doPlay(){
  if (chkObj2.checked==true) imgA.innerHTML='<IMG src=../../gif/rfexample.gif>';
  else imgA.innerHTML='';
  showA.innerHTML='chkObj1.defaultChecked='+chkObj1.defaultChecked+', chkObj2.defaultChecked='+chkObj2.defaultChecked+'<BR>';
  showA.innerHTML+='chkObj1.checked='+chkObj1.checked+', chkObj2.checked='+chkObj2.checked;
}
</SCRIPT>