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 […]