formÀÇ select °³Ã¼¿¡¼­ º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇÑ°¡¸¦ ºÎ¿ï°ªÀ¸·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ºÎ¿ï°ª)
¼Ó¼º°ªÀº formÀÇ select °³Ã¼¿¡¼­ º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇÑ°¡¸¦ ³ªÅ¸³»´Â ºÎ¿ï°ªÀÌ´Ù.

false µðÆúÆ®À̸ç, º¹¼ö ¼±ÅÃÀÌ ºÒ°¡´ÉÇÏ´Ù.
true º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇÏ´Ù.

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

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

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


multiple ¼Ó¼º ¿¹Á¦

°á°ú Ç¥½Ãâ
°á°ú Ç¥½Ãâ
<SCRIPT>
function showSelected(){
  str='';
  for (i=0;i< selObj.length;i++){
    str+='selObj.options['+i+'].selected='+selObj.options[i].selected+'<BR>';
  }
  showB.innerHTML=str;
}
</SCRIPT>
<SELECT id=selObj onchange="showSelected()">
<OPTION>Ç׸ñ ¼±Åà 1</OPTION>
<OPTION>Ç׸ñ ¼±Åà 2</OPTION>
<OPTION selected>Ç׸ñ ¼±Åà 3</OPTION>
<OPTION>Ç׸ñ ¼±Åà 4</OPTION>
<OPTION>Ç׸ñ ¼±Åà 5</OPTION>
</SELECT></DIV>
<BUTTON onclick="selObj.multiple=false;showA.innerText='selObj.multiple='+selObj.multiple">´ÜÀÏ ¼±ÅÃ</BUTTON>
<BUTTON onclick="selObj.multiple=true;showA.innerText='selObj.multiple='+selObj.multiple">º¹¼ö ¼±ÅÃ</BUTTON>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>
<DIV id=showB>°á°ú Ç¥½Ãâ</DIV>