Course offer · HLD · LLD · System Design at ₹799 until 30 Nov (not interview packs)

ProgramsJavaScript

JavaScript Events Programs

Make web pages respond to people with JavaScript events. Handle clicks, typing, forms, mouse moves, drag and drop and custom events, with expected output.

10 programs · open one, then the next

Start with DOM Events Basics
  1. 01DOM Events BasicsBeginnerLearn DOM events in JavaScript with addEventListener, named and arrow handlers, removeEventListener and the event object. Simple explanation and output.Open example →
  2. 02Custom EventsIntermediateCreate and dispatch custom events in JavaScript with CustomEvent, detail data, bubbles and dispatchEvent. Simple explanation, use cases and the output.Open example →
  3. 03Event Bubbling and CapturingIntermediateUnderstand event bubbling and capturing in JavaScript: the three phases, the capture flag and stopPropagation, with a clear explanation and output.Open example →
  4. 04Event DelegationIntermediateLearn event delegation in JavaScript: one parent listener for many children with event.target, matches() and closest(). Explanation and output.Open example →
  5. 05Keyboard EventsBeginnerHandle keyboard events in JavaScript with keydown and keyup, e.key and e.code, modifier keys, preventDefault and a shortcut map. Clear explanation and output.Open example →
  6. 06Mouse EventsBeginnerHandle mouse events in JavaScript: click, dblclick, mousemove positions, enter and leave, buttons, right click and drag detection. Explanation and output.Open example →
  7. 07Form EventsBeginnerHandle form events in JavaScript: submit with preventDefault, input vs change, focus and blur, checkbox, radio, reset and invalid. Explanation and output.Open example →
  8. 08Window EventsIntermediateHandle window events in JavaScript: load vs DOMContentLoaded, beforeunload, resize, scroll with debounce, online and hashchange. Explanation and output.Open example →
  9. 09Touch EventsIntermediateHandle touch events in JavaScript for mobile: touchstart, touchmove, touchend, swipe, pinch zoom and long press detection, with explanation and output.Open example →
  10. 10Drag and Drop EventsAdvancedBuild drag and drop in JavaScript with the HTML5 API, dataTransfer, a custom mouse and touch drag, position limits and a sortable list. Explanation and output.Open example →