checkbox³ª radio ´ÜÃß°¡ ¼±ÅõǾî Àִ°¡ÀÇ »óŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
false | µðÆúÆ®À̸ç, Á¦¾î°¡ ¼±ÅõǾî ÀÖÁö ¾Ê´Ù. |
true | Á¦¾î°¡ ¼±ÅõǾî ÀÖ´Ù. |
ÀÌ ¼Ó¼ºÀº Àбâ/¾²±â·Î µðÆúÆ®°ªÀº falseÀÌ´Ù.
¼±ÅõÇÁö ¾ÊÀº checkbox´Â form °³Ã¼ÀÇ ¼Û½Å¿¡¼ ¹Ýȯ°ªÀ» ¼Û½ÅÇÏÁö ¾Ê´Â´Ù.
checkbox´Â À̸§ÀÌ ¾ø¾îµµ µ¶¸³ÀûÀ¸·Î ¼±ÅÃµÉ ¼ö Àִ´Ù.
¼±ÅÃÀ» Ãë¼ÒÇϱâ À§Çؼ´Â ´Ù½Ã ´ÜÃ߸¦ Ŭ¸¯ÇÏ¸é µÈ´Ù.
±×·¯³ª radio ´ÜÃß´Â À̸§(name)ÀÌ ÀÖ¾î¾ß »ç¿ëÀÚ°¡ ¼±ÅÃÇÒ ¼ö ÀÖ´Ù. °°Àº À̸§ Áß¿¡¼ ¹èŸÀûÀ¸·Î ¼±ÅõȴÙ.
¼±ÅÃÀ» Ãë¼ÒÇϱâ À§Çؼ´Â ´Ù¸¥ ´ÜÃ߸¦ ¼±ÅÃÇÏ¸é µÈ´Ù.
°³Ã¼ | script | HTML | ±Ô°Ý | IE |
---|
ÀÌ ¼Ó¼ºÀº (¿µ¹®) HTML 3.2¿Í (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼ Á¤ÀǵǾú´Ù.
¼Ó¼º »óÅ º¸±â : <INPUT id=chkObj1 type="radio" name="rdo" checked 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> document.onload=doPlay(); function doPlay(){ if (chkObj2.checked==true) imgA.innerHTML='<IMG src=../../gif/rfexample.gif>'; else imgA.innerHTML=''; showA.innerText='chkObj1.checked='+chkObj1.checked+', chkObj2.checked='+chkObj2.checked; } </SCRIPT>