´ÜÃßÀÇ ºÐ·ù¿Í µðÆúÆ® ÀÛ¿ëÀ» ¹ÝȯÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº ´ÜÃßÀÇ ºÐ·ù¿Í µðÆúÆ® ÀÛ¿ëÀ» ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

button µðÆúÆ®À̸ç, ¸í·ÉÀ» À§ÇÑ ´ÜÃ߸¦ »ý¼ºÇÑ´Ù.
reset Àç¼³Á¤ ´ÜÃ߸¦ »ý¼ºÇÑ´Ù. ÀÌ ´ÜÃß°¡ form ¼Ó¿¡ ÀÖÀ¸¸é, reset °³Ã¼¿¡ ÇØ´çÇϸç form °³Ã¼ ¼ÓÀÇ ¸ðµç ÀÔ·ÂÇʵåµéÀ» ÃʱⰪÀ¸·Î ȯ¿øÇÑ´Ù.
submit ¼Û½Å´ÜÃ߸¦ »ý¼ºÇÑ´Ù. ÀÌ ´ÜÃß°¡ form ¼Ó¿¡ ÀÖÀ¸¸é, submit °³Ã¼¿¡ ÇØ´çÇϸç form °³Ã¼ ¼ÓÀÇ ¸ðµç ÀÔ·ÂÇʵåÀÇ À̸§(name)°ú °ª(value)ÀÇ Â¦µéÀ» ¼­¹ö¿¡ ¼Û½ÅÇÑ´Ù.

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

Ư±â

¼Û½Å´ÜÃß´Â input °³Ã¼¿¡¼­ submit.typeÀ¸·Î »ý¼ºµÈ ´ÜÃß¿Í °°Àº µðÆúÆ® ºñÇìÀ̹ö¸¦ °®´Â´Ù.
»ç¿ëÀÚ°¡ form¿¡ Æ÷ÇÔµÈ ¼Û½Å´ÜÃ߸¦ Ŭ¸¯Çϸé, formÀÌ ¼Û½ÅµÈ´Ù. ¼Û½Å´ÜÃßÀÇ µðÆúÆ® ºñÇìÀ̹ö´Â ´ÜÃß ÁÖÀ§ÀÇ Å׵θ®¿¡ Ç¥½ÃµÈ´Ù. form ¼ÓÀÇ Á¦¾î´ÜÃß°¡ ÃÊÁ¡À» ¹ÞÀ¸¸é Å׵θ®°¡ º¸ÀδÙ.
¼Û½Å´ÜÃß°¡ name ¼Ó¼º°ªÀ» °¡Áö¸é, ±× °ªÀÌ ¼Û½Å´ÜÃß Ç¥¸é¿¡ Ç¥½ÃµÇ°í ¼­¹ö¿¡ ¼Û½ÅµÇ´Â µ¥ÀÌÅÍ name°ú valueÀÇ Â¦µé¿¡ Æ÷ÇԵȴÙ.

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

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


button °³Ã¼ÀÇ ¼Ó¼º ¿¹Á¦

 

<FORM name="formObj" onsubmit="return false">
<INPUT name="in1Obj" type="button" value="´ÜÃß °³Ã¼">
<INPUT name="in2Obj" type="reset" value="Àç¼³Á¤">
<INPUT name="in3Obj" type="submit" disabled value="¼Û½Å">&nbsp;
<BUTTON name="in4Obj">´ÜÃß °³Ã¼</BUTTON>
</FORM>
<BR>
<SCRIPT>
str='formObj.in1Obj.type=<FONT color=blue>'+formObj.in1Obj.type+'</FONT><BR>';
str+='formObj.in2Obj.type=<FONT color=blue>'+formObj.in2Obj.type+'</FONT><BR>';
str+='formObj.in3Obj.type=<FONT color=blue>'+formObj.in3Obj.type+'</FONT><BR>';
str+='formObj.in4Obj.type=<FONT color=blue>'+formObj.in4Obj.type+'</FONT><BR>';
document.write(str);
</SCRIPT>