Skip to content
Advertisements

Month: February 2019

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

onload Event

JavaScript onload Event

The JavaScript onload feature works when the web page’s images, videos, and articles are fully loaded.

JavaScript Let,Var and Const

JavaScript Let,Var and Const

In ES6, a new way to define the variable is const and let keywords. Before ES6, developers used "var" to report different variables.