Skip to content
Advertisements

Category: javascript lessons

HTML DOM classList

HTML DOM classList

Adding and deleting classes should be one of the most common tasks for JavaScript and DOM jobs.

JavaScript addEventListener()

JavaScript addEventListener()

Sometimes, when you create a web page, you may want to execute a piece of code when someone triggers a particular type of activity on your website

JavaScript delta

JavaScript delta

deltaMode The JavaScript deltaMode property returns a number that represents the unit of the shift values. 0 = pixels 1 = lines 2 = pages Syntax: var deltaMode = event.deltaMode […]

JavaScript Keyboard Events

JavaScript Keyboard Events

onkeydown event The JavaScript onkeydown property occurs when the user presses a key. Syntax: HTML Attribute <element onkeydown = “handler(event)“> Event Property object.onkeydown = handler; attachEvent Method object.attachEvent(“onkeydown“, handler) addEventListener Method object.addEventListener(“keydown“, handler, useCapture) onkeydown […]