checkbox³ª radio ´ÜÃß°¡ µðÆúÆ®·Î ¼±ÅõǾî Àִ°¡ÀÇ »óŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
false | Á¦¾î°¡ µðÆúÆ®·Î ¼±ÅõÇÁö ¾Ê´Â´Ù. |
true | µðÆúÆ®À̸ç, Á¦¾î°¡ µðÆúÆ®·Î ¼±ÅõȴÙ. |
ÀÌ ¼Ó¼ºÀº Àбâ/¾²±â·Î µðÆúÆ®°ªÀº trueÀÌ´Ù.
ÀÌ ¼Ó¼º°ªÀº ÇÁ·Î±×·¥À¸·Î º¯°æ½Ãų ¼ö ÀÖÀ¸³ª checkbox³ª radioÀÇ ¸ð¾çÀ̳ª ¼Û½ÅµÇ´Â ¹æ½Ä¿¡´Â º¯È°¡ ¾ø´Ù.
°³Ã¼ | script | HTML | ±Ô°Ý | IE |
---|
ÀÌ ¼Ó¼ºÀº (¿µ¹®) 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>