´ÜÃßÀÇ ºÐ·ù¿Í µðÆúÆ® ÀÛ¿ëÀ» ¹ÝȯÇÑ´Ù.
button | µðÆúÆ®À̸ç, ¸í·ÉÀ» À§ÇÑ ´ÜÃ߸¦ »ý¼ºÇÑ´Ù. |
reset | Àç¼³Á¤ ´ÜÃ߸¦ »ý¼ºÇÑ´Ù. ÀÌ ´ÜÃß°¡ form ¼Ó¿¡ ÀÖÀ¸¸é, reset °³Ã¼¿¡ ÇØ´çÇϸç form °³Ã¼ ¼ÓÀÇ ¸ðµç ÀÔ·ÂÇʵåµéÀ» ÃʱⰪÀ¸·Î ȯ¿øÇÑ´Ù. |
submit | ¼Û½Å´ÜÃ߸¦ »ý¼ºÇÑ´Ù. ÀÌ ´ÜÃß°¡ form ¼Ó¿¡ ÀÖÀ¸¸é, submit °³Ã¼¿¡ ÇØ´çÇϸç form °³Ã¼ ¼ÓÀÇ ¸ðµç ÀÔ·ÂÇʵåÀÇ À̸§(name)°ú °ª(value)ÀÇ Â¦µéÀ» ¼¹ö¿¡ ¼Û½ÅÇÑ´Ù. |
ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀ¸·Î µðÆúÆ®°ªÀº buttonÀÌ´Ù.
¼Û½Å´ÜÃß´Â input °³Ã¼¿¡¼ submit.typeÀ¸·Î »ý¼ºµÈ ´ÜÃß¿Í °°Àº µðÆúÆ® ºñÇìÀ̹ö¸¦ °®´Â´Ù.
»ç¿ëÀÚ°¡ form¿¡ Æ÷ÇÔµÈ ¼Û½Å´ÜÃ߸¦ Ŭ¸¯Çϸé, formÀÌ ¼Û½ÅµÈ´Ù.
¼Û½Å´ÜÃßÀÇ µðÆúÆ® ºñÇìÀ̹ö´Â ´ÜÃß ÁÖÀ§ÀÇ Å׵θ®¿¡ Ç¥½ÃµÈ´Ù.
form ¼ÓÀÇ Á¦¾î´ÜÃß°¡ ÃÊÁ¡À» ¹ÞÀ¸¸é Å׵θ®°¡ º¸ÀδÙ.
¼Û½Å´ÜÃß°¡ name ¼Ó¼º°ªÀ» °¡Áö¸é, ±× °ªÀÌ ¼Û½Å´ÜÃß Ç¥¸é¿¡ Ç¥½ÃµÇ°í
¼¹ö¿¡ ¼Û½ÅµÇ´Â µ¥ÀÌÅÍ name°ú valueÀÇ Â¦µé¿¡ Æ÷ÇԵȴÙ.
°³Ã¼ | script | HTML | ±Ô°Ý | IE |
---|
ÀÌ ¼Ó¼ºÀº HTML 4.0°ú (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼ Á¤ÀǵǾú´Ù.
<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="¼Û½Å"> <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>