the murmurous sea

JS: about Event 본문

#dev/개념정리

JS: about Event

lunacer 2020. 6. 3. 18:16

What is Event?

- The Event interface represents an event which takes place in the DOM.

- An event can be triggered by the user action or can also be triggered programmatically.

- Event itself contains the properties and methods which are common to all events.

- 이벤트는 이벤트 대상, 이벤트 종류, 이벤트가 발생했을 때 실행되는 함수, 이 3가지로 구성

 

Constructor

Event()

 

How to add 

1. HTML tag - inline: add the function to the tag property.

2. HTML tag - property listener: create a function directly with event parameter.

3. JS - addEventListener method

 


https://developer.mozilla.org/en-US/docs/Web/API/Event

https://webcoding.tistory.com/entry/JavaScript-DOM-%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%EC%9D%B4%EB%B2%A4%ED%8A%B8%EC%9D%98-%EC%A0%95%EC%9D%98%EC%99%80-%EC%9D%B4%EB%B2%A4%ED%8A%B8-%EB%93%B1%EB%A1%9D-%EB%B0%A9%EB%B2%95

'#dev > 개념정리' 카테고리의 다른 글

Event: keydown, keypress, keyup  (0) 2020.06.05
JS ES6: Hoisting, Temporal dead zone  (0) 2020.06.03
JS: EventTarget.addEventListener() (empty)  (0) 2020.06.03
JS ES6: Functions hoisting check  (0) 2020.06.03
JS: Literal (incompleted)  (0) 2020.05.27
Comments