form Á¦¾î°¡ ¼Û½ÅµÉ ¶§ ¼­¹ö¿¡ ¼Û½ÅµÇ´Â °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº form Á¦¾î°¡ ¼Û½ÅµÉ ¶§ ¼­¹ö¿¡ ¼Û½ÅµÇ´Â °ªÀ» ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

°³Ã¼°¡ ¼­¹ö¿¡ ¼Û½ÅµÇ¸é name/value ¦ÀÌ ¼­¹ö¿¡¼­ÀÇ Ã³¸®¸¦ À§ÇÏ¿© ¼­¹ö¿¡ Àü´ÞµÈ´Ù.

ÀÌ ¼Ó¼ºÀº Àбâ/¾²±âÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.

Ư±â

¼±Åà ¸ñ·Ï ¹Ú½º Á¦¾î¿¡¼­ ¼±ÅÃµÈ Á¦¾îÀÇ °ª¸¸À» ¼Û½ÅÇÑ´Ù.

¿ìÈ£Àû ¼­¹ö¿¡´Â »ç¿ëÀÚ¿¡ °ü°è¾øÀÌ µ¥ÀÌÅ͸¦ Á÷Á¢ ¼Û½ÅÇÒ ¼ö ÀÖ´Ù.
»ç¿ëÀÚ´Â ±× °ª(value)À» º¼ ¼ö ¾ø°í ³»ºÎ ÅؽºÆ®(innerText)¸¸À» º¼ ¼ö ÀÖ´Ù.

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

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



°á°ú Ç¥½Ãâ
<SCRIPT>
function showResult(){
  str='formName.selObj.selectedIndex='+formName.selObj.selectedIndex+'<BR>';
  str+='formName.selObj.options(formName.selObj.selectedIndex).value='+
    formName.selObj.options(formName.selObj.selectedIndex).value+'<BR>';
  str+='formName.selObj.value='+formName.selObj.value+'<BR>';
  showA.innerHTML=str;
}
</SCRIPT>
<FORM name="formName" action="http://koxo.com/lang/js/object/exp/xsubmit.cgi">
<SELECT name="selObj" size="5" onchange="showResult()">
<OPTION value="itemNumb#11">¼±Åà Ç׸ñ 1</OPTION>
<OPTION value="itemNumb#22" selected>¼±Åà Ç׸ñ 2</OPTION>
<OPTION value="itemNumb#33">¼±Åà Ç׸ñ 3</OPTION>
<OPTION value="itemNumb#44">¼±Åà Ç׸ñ 4</OPTION>
<OPTION value="itemNumb#55">¼±Åà Ç׸ñ 5</OPTION>
</SELECT><BR>
<INPUT type="submit">
</FORM>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>