HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Javascript Events Tutorial - How Web Developers Respond to User Input

333,203 views October 26, 2015 18:50

Watch on YouTube
ChannelLearnCode.academy

Description from the creator

Simple Javascript Events Tutorial with code! Almost every Web Developer finds themselves needing to respond to user actions on a page by changing content or adjusting the page display somehow. The way you do that is by listening to Javascript events.

VIEW THE CODE:
- addition: codepen.io/anon/pen/vOeeqG?editors=101
- pic link: codepen.io/anon/pen/vxYxKN?editors=101

Popular Javascript Events Are:
- click
- mouseenter
- mouseleave
- mousedown
- mouseup
- mousemove
- keydown
- keyup
- blur
- focus

See list of all javascript events here: developer.mozilla.org/en-US/docs/Web/Events

In this lesson, we'll add event listeners to html elements. When the users click, focus, blur, press a key, or move their mouse, javascript will get notified and we can make the webpage change.

Listening to Javascript events is a bread and butter task for web development and web developers.

-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-

About this tutorial

LearnCode.academy published this 18:50 video tutorial on October 26, 2015. It has been watched 333,203 times on YouTube.

Duration
18:50
Published
October 26, 2015
Views
333,203
Likes
3,473

Tags

Share

Further reading

  • HTMLElement: input event - Web APIs | MDN developer.mozilla.org

    For <input> elements with type=checkbox or type=radio, the input event should fire whenever a user toggles the control, per the HTML5 specification. However, historically this has not always been the case. Check compati…

  • JavaScript - Events - Tutorialspoint tutorialspoint.com

    When the user clicks a button, that click too is an event. Other examples include events like pressing any key, closing a window, resizing a window, etc. Developers can use these events to execute JavaScript coded respo…

  • JavaScript Events - W3Schools Online Web Tutorials w3schools.com

    Here are some examples of HTML events: An HTML web page has finished loading; An HTML input field was changed; An HTML button was clicked; Often, when events happen, you may want to do something. JavaScript lets you exe…

This tutorial in other languages