multiple ¾ÖÆ®¸®ºäÆ®ÀÇ °ª¿¡¼­ select Á¦¾î Çü½ÄÀ» ¹ÝȯÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº multiple ¾ÖÆ®¸®ºäÆ®ÀÇ °ª¿¡¼­ select Á¦¾î Çü½ÄÀ» ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

select-multiple multiple ÀÌÆ®¸®ºäÆ®°¡ Âü(true)ÀÌ´Ù. º¹¼öÀÇ OPTION ¿¤·¹¸àÆ® ¼±ÅÃÀÌ °¡´ÉÇÏ´Ù.
select-one µðÆúÆ®À̸ç, multiple ÀÌÆ®¸®ºäÆ®°¡ ºÎ(false)ÀÌ´Ù. ÇÑ°³ÀÇ OPTION ¿¤·¹¸àÆ®¸¸ ¼±ÅÃÇÒ ¼ö ÀÖ´Ù.

ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀ¸·Î µðÆúÆ®°ªÀº select-oneÀÌ´Ù.

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

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

.


<SELECT id="sel1Obj" size=4>
<OPTION>¼±Åà 1
<OPTION selected>¼±Åà 2
<OPTION>¼±Åà 3
<OPTION>¼±Åà 4
</SELECT>

<SPAN style=width:5em></SPAN>
<SELECT id="sel2Obj" multiple>
<OPTION>¼±Åà 1
<OPTION selected>¼±Åà 2
<OPTION>¼±Åà 3
<OPTION selected>¼±Åà 4
</SELECT><BR>
<SCRIPT>
str='sel1Obj.type='+sel1Obj.type+'<BR>';
str+='sel2Obj.type='+sel2Obj.type+'<BR>';
document.write(str);
</SCRIPT>