¸¶¿ì½º¸¦ Ŭ¸¯ÇÑ °Í°ú °°Àº È¿°ú¸¦ ³»µµ·Ï onclick À̺¥Æ®¸¦ ¹ß»ý½ÃŲ´Ù.
ÆĶó¸ÞÅÍ´Â ¾ø´Ù.
¹Ýȯ°ªÀº ¾ø´Ù.
°³Ã¼ | script | IE |
---|
ÀÌ ¸Þ¼µå´Â (¿µ¹®)DOM1(W3C Document Object Model Level 1)¿¡¼ Á¤ÀǵǾú´Ù.
click ¸Þ¼µå·Î °³Ã¼¿¡ ÃÊÁ¡À» ÁÖÁö ¾Ê´Â´Ù.
üũ¹Ú½º¿¡µðÆúÆ®·Î´Â °³Ã¼¿¡ ÃÊÁ¡À» ÁÖÁö¸¸ click ¸Þ¼µå·Î´Â ÃÊÁ¡À» ÁÖÁö ¸øÇÑ´Ù.
<SCRIPT> function doClick1(){ chkObj.focus(); } function doClick2(){ chkObj.click(); } </SCRIPT> <SCRIPT for=chkObj event=onfocus>showA.innerHTML='üũ¹Ú½º°¡ ÃÊÁ¡À» ¹ÞÀ½!';</SCRIPT> <SCRIPT for=chkObj event=onblur>showA.innerHTML='üũ¹Ú½º°¡ ÃÊÁ¡À» ¹ÞÁö ¾ÊÀ½!';</SCRIPT> <P><SPAN class=method>click</SPAN> ¸Þ¼µå·Î °³Ã¼¿¡ ÃÊÁ¡À» ÁÖÁö ¾Ê´Â´Ù.</P> <INPUT type="checkbox" id=chkObj></INPUT> üũ¹Ú½º¿¡ <BUTTON onclick="doClick1()">ÃÊÁ¡À» ÁØ´Ù.</BUTTON> <BUTTON onclick="doClick2()">ÃÊÁ¡À» ÁÖÁö ¾Ê´Â´Ù.</BUTTON> <DIV id=showA style=margin-left:3em;color:blue></DIV>