ÃßõµÇ¾ú½À´Ï´Ù.
|
´ÜÃà URL: https://humoruniv.com/program8020 URL º¹»ç |
´«ÆÃÇϴ٠óÀ½À¸·Î ±Û½áº¸³×¿ë
À¯Æ©ºê·Î µ¶ÇÐÁßÀÔ´Ï´Ù
thisºÎºÐÀÌ ÀßÀÌÇØ°¡ ¾È°¡¿ä
»çÁøÃ³·³ this = document·Î ³ª¿À´Â°Å °°¾Æ¼
document.style.backgroundColor = "#e9ecef"}); ÀÌ·¸°Ô ÀÛ¼ºÇÏ¸é ¿¡·¯°¡ ¶ß³×¿ä
¿¡·¯(index.html:14 Uncaught TypeError: Cannot set property 'backgroundColor' of undefined
at HTMLLIElement.<anonymous>)
|
¡ã ´ÙÀ½±Û | '¸®´ª½º¿Ãų ' À̶ó´Â ¾ÛÀ» °øÀ¯ÇÕ´Ï´Ù.(ft.È«º¸) | ºñ´ÏÁî |
![]() ![]() ![]() ![]() |
2021-07-10 [23:48] |
¡å ÀÌÀü±Û | [ÅõÇ¥] ´Ùµé ÁÖ °³¹ß¾ð¾î°¡ ¾î¶»°Ô µÇ¼¼¿ä? | û³â½á¿ä |
![]() ![]() ![]() ![]() |
2021-07-06 [18:02] |
![]() |
°í¿î¸»»ç¿ëÀÚ |
this.style.backgroundColor = "#e9ecef"; console.log(this);});·Î ¼öÁ¤Çؼ Âï¾îºÁ. this ºÒ¸®´Â ºÎºÐÀÌ ´Ù¸§
|
00 |
![]() ![]() ![]() ![]() |
2021-07-09 |
![]() |
gmltjd0911 |
console.log·Î Âï´Â this¿Í this.style.backgroundColorÀÇ this´Â ´Ù¸¥ thisÀÔ´Ï´Ù. console.log·Î Âï´Â this´Â DOMContentLoaded À̺¥Æ®°¡ ¹ß»ýÇßÀ»¶§ ½ÇÇàµÇ´Â ÄݹéÇÔ¼ö¿¡¼ÀÇ thisÀ̰í ÈÄÀÚ´Â mouseover À̺¥Æ®°¡ ¹ß»ýÇßÀ» ¶§ ½ÇÇàµÇ´Â ÄݹéÇÔ¼ö¿¡¼ÀÇ thisÀÔ´Ï´Ù. ÀÚ¼¼ÇÑ »çÇ×Àº ¾Ë°í ½ÍÀ¸½Ã¸é https://developer.mozilla.org/ko/docs/Web/j a v a - s c r i p t/Reference/Operators/this À̰÷À» º¸½Ã¸é µÉ °Í °°½À´Ï´Ù.
|
10 |
![]() ![]() ![]() ![]() |
2021-07-19 |
![]() |
![]() °³¹ßÀÚ°¡»óÆÈÀÚ |
ÀÌ ºÐ ¸»¾¸ÀÌ ¸Â±¸¿ä, DOM Æ®¸®±¸Á¶»ó document´Â °¡Àå »óÀ§ÀÌ°í ¿¡·¯¸Þ½ÃÁö ±×´ë·Î backgroundColor ¼Ó¼ºÀ» °¡Áö°í ÀÖÁö ¾Ê¾Æ¿ä. Áú¹®³»¿ë ´µ¾Ó½º»ó ¹é±×¶ó¿îµå »öÀ» º¯°æÇغ¸°í ½ÍÀº °ÍÀ¸·Î ÀÌÇØÇߴµ¥, ±×·¸°Ô ÇÏ·Á¸é document.body ¿¡¼ ã¾Æ¾ßÇØ¿ä.
|
00 |
![]() ![]() ![]() |
2021-07-28 |
¡ã ´ÙÀ½±Û | '¸®´ª½º¿Ãų ' À̶ó´Â ¾ÛÀ» °øÀ¯ÇÕ´Ï´Ù.(ft.È«º¸) | ºñ´ÏÁî |
![]() ![]() ![]() ![]() |
2021-07-10 [23:48] |
¡å ÀÌÀü±Û | [ÅõÇ¥] ´Ùµé ÁÖ °³¹ß¾ð¾î°¡ ¾î¶»°Ô µÇ¼¼¿ä? | û³â½á¿ä |
![]() ![]() ![]() ![]() |
2021-07-06 [18:02] |