JavaScript

JavaScript Intro

JavaScript Intro Quiz

JavaScript Intro Exercise

JavaScript Basic

JavaScript Basic Quiz

JavaScript Basic Exercise

JavaScript Advance

JavaScript Advance Quiz

JavaScript Advance Exercise

JavaScript ES6

JavaScript ES6 Quiz

JavaScript ES6 Exercise

JavaScript Array Methods and Properties

JavaScript String Methods and Properties

JavaScript Number Methods and Properties

JavaScript Math Properties and Methods

JavaScript Date Methods and Properties

JavaScript Global Methods and Properties

JavaScript RegExp Properties and Methods

JavaScript Class Methods and Keywords

JavaScript Errors, JSON and Booleans

JavaScript Statements

JavaScript Window History Object Properties and Methods

JavaScript Window Location Object Properties and Methods

JavaScript Window Screen Object Properties

JavaScript Window Navigator Object Properties and Methods

JavaScript Window Object Properties and Methods

JavaScript Console Object Methods

JavaScript Geolocation and Storage APIs

JavaScript CSSStyleDeclaration Object Methods and Properties

HTML DOM Documents Object Properties and Methods

DOM HTMLCollection Properties and Methods

HTML DOM Attributes Properties and Methods

HTML DOM Elements Properties and Methods

HTML DOM Style Object Properties

HTML DOM AnimationEvent Properties and Methods

HTML DOM ClipboardEvent Properties and Methods

HTML DOM DragEvent Properties and Methods

HTML DOM FocusEvent Properties and Methods

HTML DOM HashChangeEvent Properties and Methods

HTML DOM InputEvent Properties and Methods

HTML DOM KeyboardEvent Properties and Methods

HTML DOM MouseEvent Properties and Methods

HTML DOM PageTransitionEvent Properties and Methods

HTML DOM ProgressEvent Properties and Methods

HTML DOM StorageEvent Properties and Methods

HTML DOM TransitionEvent Properties and Methods

HTML DOM WheelEvent Properties and Methods

HTML DOM UiEvent Properties and Methods

HTML DOM TouchEvent Properties and Methods

The Event Object Properties and Methods

JavaScript

All JavaScript Tutorials, Quizzes & Exercises

JavaScript Intro
Introduction
JavaScript is one of the most popular programming languages on the planet!
Variables
JavaScript Variables are containers for storing data values. The value of a variable can change throughout the program.
Comments
JavaScript comments are any code after a double slash //, or between /* and */, is treated as a comment, and will be ignored, and not executed.
Data Types
JavaScript data type refers to the types of values a program can work with.
Math Operators
JavaScript Math Operators are called arithmatic operators and they can perform very well all mathematical oeprations.
Assignment Operators
Assignment operators are used to assign value in JavaScript.
Comparison Operators
Comparison Operators are used in logical statements to find out if variables or values are different.
Logical Operators
Logical operators or Boolean operators is used to evaluate an expression and return true or false.
String Opeators
String operators in JavaScript are basically used for string concatenation i.e., adding two strings together.
JavaScript Intro Quiz
INTRO QUIZ
In JavaScript Intro Quiz, we will take quiz of all the tutorials present inside the JavaScript Introduction Section
JavaScript Intro Exercise
INTRO EXERCISE
In JavaScript Intro Exercise, we take a test of all tutorials which you have read in Intro section.
JavaScript Basic
IF Statement
If statement verifies the given condition and if the condition is true, then the code inside the If statement is executed
Else Statement
The else statement will execute when the if condition is not true.
Else if Statement
The else if statement is present between if and else statements and it add more functionality to it.
Switch Statement
switch statement in JavaScript test for various cases and if any case return true than that particular case will be executed
For Loop
For loop is a loop in JavaScript that execute code multiple times until the value not becomes false
While Loop
While loop is a loop in JavaScript that execute code multiple times until a specified condition is true.
Do While Loop
Do while loop is similar to while loop. However, it will execute the statement one time even the condition is not true.
Break and Continue
Break statement jump out of a loop and continue executing the code after the loop. continue statement breaks only one iteration in the loop, and continues with the next iteration.
Functions
A JavaScript function is a block of code designed to perform a particular task. Its main advantage is code reusability
Function Parameters
Functions can take parameters. Function parameters are the names listed in the function's definition.
Multiple Parameters
JavaScript functions allows us to add as many parameter as we want in them
Function Return
A function can have an optional return statement. It is used to return a value from the function.
Alert,Prompt,Confirm
An alert box is used when you want to ensure that information gets through to the user.A prompt box is often used to have the user input a value before entering a page. A confirm box is often used to have the user verify or accept something.
JavaScript Objects
JavaScript variables are containers for data values. Objects are variables too, but they can contain many values. They are written as name:value pairs
Object Constructor
We can create our own objects with the help of an Object Constructor.
Object Initialization
Object Initialization is done by object literal or initializer syntax to create single objects.
Methods in Objects
Methods are functions that are stored as object properties. It can be referenced using the this keyword.
JavaScript Basic Quiz
BASIC QUIZ
In JavaScript Basic Quiz, we take quiz of all tutorials present in the JavaScript Basic Section
JavaScript Basic Exercise
BASIC EXERCISE
In JavaScript Basic Exercise, we take exercise test of all tutorials present in the JavaScript Basic Section
JavaScript Advance
Arrays
Arrays store multiple values in a single variable. JavaScript arrays are built for this same purpose
Array Creation
There are different methods for creating an array. One such method is to first declare an empty array and then insert item in it.
Array Properties
JavaScript arrays have useful built-in properties and methods. one such property is length. other is concat
Associative Arrays
In Associative Arrays, arrays are given named indexes instead of numbered index.
The Math Object
The Math object allows you to perform mathematical tasks, and includes several properties.
The Date Object
The Date object allows us to work with date. A date consists of a year, a month, a day, an hour, a minute, a second, and milliseconds.
DOM
When the HTML page is loaded and rendered visually on the screen. The browser builds the Document Object Model of that page, which is its logical structure.
Selecting Elements
Elements can be selected in JavaScript as the whole page is an object and we can access each and every element in it using the document object
Working with DOM
Each element in the DOM has a set of properties and methods that provide information about their relationships in the DOM. By this, we can work with them.
Changing Elements
Once you have selected the element(s) you want to work with, you can change their attributes.
Creating Element
We can easily create element in JavaScript by using document.createElement() and document.createTextNode().
Removing Element
To remove an HTML element, you must select the parent of the element and use the removeChild(node) method.
Replacing Element
To replace an HTML element, the element.replaceChild(newNode, oldNode) method is used.
Animations
JavaScript allow us to use our animations dynamically inside our webpage. It helps in getting better user experiance.
Event Handling
Events are functions which perform any activity when they are called. JavaScript provide us number of events which makes our website dynamic.
Form Validation
HTML5 adds some attributes that allow form validation. These attributes are required, pattern, autofocus and many more.
JavaScript Advance Quiz
ADVANCE QUIZ
In JavaScript Advance Quiz, questions related to JavaScript advance section will be asked
JavaScript Advance Exercise
ADVANCE EXERCISE
In JavaScript Advance Exercise, questions related to JavaScript advance section will be asked
JavaScript ES6
ES6 Intro
ECMAScript (ES) is a scripting language specification created to standardize JavaScript. ES6 is a superset of JavaScript (ES5).
For In Loop
The for...in loop is intended for iterating over the enumerable keys of an object.
For of Loop
The for of loop creates a loop iterating over iterable objects and arrays.
Functions
The style and method for function declaration is completely changed in ES6. Now , array function are introduced.
ForEach Loop
The ForEach method allow user to perform action on each item present in the array.
Array Destructuring
destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.
Object Destructuring
Object destructuring allows JavaScript expression to make it possible to unpacks properties into distinct variables.
JavaScript ES6 Quiz
ES6 QUIZ
In JavaScript ES6 Quiz, questions related to JavaScript ES6 section will be asked
JavaScript ES6 Exercise
ES6 EXERCISE
In JavaScript ES6 Exercise, questions related to JavaScript ES6 section will be asked
JavaScript Array Methods and Properties
Array concat() in JavaScript
The concat() method is used to join(concatenate) two or more arrays. This method returns a new array having the joined arrays. However, it does not change the existing arrays.
Array constructor in JavaScript
The constructor property is used to return the function that created the Array prototype. In JavaScript arrays, the constructor property returns function Array() { [native code] }.
Array copyWithin() in JavaScript
The copyWithin() method is used to copy array elements to another position in the array. This will overwrite the existing values. We cannot add items in an array with it.
Array entries() in JavaScript
The entries() method is used to return an Array Iterator object with key/value pairs. It does not change the original array.
Array every() in JavaScript
The every() method is used to execute a function for each array element. It returns true if the function returns true for all elements. It returns false if the function returns false for one element.
Array fill() in JavaScript
The fill() method is used to fill specified elements in an array with a value. It will overwrite the original array. If starting and ending positions are not specified then all elements will be filled.
Array filter() in JavaScript
The filter() method is used to create a new array filled with elements that pass a test provided by a function. It does not execute the function for empty elements and does not change the original array.
Array find() in JavaScript
The find() method is used to return the value of the first element that passes a test. It will execute a function for each array element.
Array findIndex() in JavaScript
The findIndex() method is used to execute a function for each array element. It returns the index of the first element that passes a test. It returns -1 if no match is found.
Array forEach() in JavaScript
The forEach() method is used to call a function for each element in an array. It will not be for empty elements.
Array.from() in JavaScript
The Array.from() method is used to return an array from any object with a length property. It returns an array from any iterable object. It is a static property and is only used by the Array.from() method.
Array includes() in JavaScript
The includes() method is used to return true if an array contains a specified value else false. It is case-sensitive.
Array indexOf() in JavaScript
The indexOf() method is used to return the first index of a specified value. It will return -1 if the value is not found. This method starts at a specified index and searches from left to right.
Array.isArray() in JavaScript
The isArray() method is used to return true if an object is an array else false. It is a static property and we can only use it as Array.isArray().
Array join() in JavaScript
The join() method is used to return an array as a string. It will not change the original array. We can use any separator like comma (,), dot (.).
Array keys() in JavaScript
The keys() method is used to return an Array Iterator object with the keys of an array. It does not change the original array.
lastIndexOf() in JavaScript in Array
The lastIndexOf() method is used to return the last index of a specified value. It will return -1 if the value is not found. It starts at a specified index and searches from right to left.
Array length in JavaScript
The length property is used to set or return the number of elements in an array.
Array map() in JavaScript
The map() method is to create a new array by calling a function for every array element. It calls a function once for each element in an array.
Array pop() in JavaScript
The pop() method is used to remove the last element of an array. It changes the original array and returns the removed element.
Array prototype in JavaScript
The prototype property allows us to add new properties and methods to arrays. It is available with all JavaScript objects.
Array push() in JavaScript
The push() method is used to add new items to the end of an array. It changes the length of the array and returns the new length.
Array reduce() in JavaScript
The reduce() method is used to execute a reducer function for the array element. It returns a single value i.e, the function accumulated result.
Array reduceRight() in JavaScript
The reduceRight() method is used to execute a reducer function for each array element. It works from right to left. It returns a single value which is the function accumulated result.
Array reverse() in JavaScript
The reverse() method is used to reverse the order of the elements in an array. It will overwrite the original array.
Array shift() in JavaScript
The shift() method is used to remove the first item of an array. It changes the original array and returns the shifted element.
Array slice() in JavaScript
The slice() method is used to return selected elements in an array, as a new array. This method is used to selects from a given start, up to a given end. However, it does not change the original array.
Array some() in JavaScript
The some() method is used to check if any array elements pass a test which is provided as a callback function. It executes the callback function once for each array element
Array sort() in JavaScript
The sort() method is used to sort the elements of an array. It will overwrite the original array. It sorts the elements as strings in alphabetical and ascending order.
Array splice() in JavaScript
The splice() method is used to add and/or remove array elements. It will overwrite the original array.
Array toString() in JavaScript
The toString() method is used to return a string with array values separated by commas. It does not change the original array.
Array unshift() in JavaScript
The unshift() method is used to add new elements to the beginning of an array. It will overwrite the original array.
Array valueOf() in JavaScript
The valueOf() method is used to return the array itself. It does not change the original array.
JavaScript String Methods and Properties
String length in JavaScript
The length property is used to return the length of a string. For an empty string, its value is 0.
String prototype in JavaScript
The prototype property is used to add new properties and methods to strings. It is available for all JavaScript objects.
String charAt() in JavaScript
The charAt() method is used to return the character at a specified index in a string. The index of a string is like an array that starts from 0 and so on.
String charCodeAt() in JavaScript
The charCodeAt() method is used to return the Unicode of the character at a specified index in a string. The index of the first character is 0 and so on.
String concat() in JavaScript
The concat() method is used to join two or more strings. It does not have any impact on existing strings and it will return a new string.
String endsWith() in JavaScript
The endsWith() method is used to return true if a string ends with a specified string else it will return false. This method is case-sensitive.
String.fromCharCode() in JavaScript
The String.fromCharCode() method is used to convert Unicode values into characters. It is a static method of string objects.
String includes() in JavaScript
The includes() method is used to return true if a string contains a specified string else it will return false. This method is case-sensitive.
String indexOf() in JavaScript
The indexOf() method is used to return the position of the first occurrence of a specified value in a string. If the value is not present then it will return -1. This method is case-sensitive.
String lastIndexOf() in JavaScript
The lastIndexOf() method is used to return the index of the last occurrence of a specified value in a string. However, it returns the index from the beginning position i.e, 0.
String localeCompare() in JavaScript
The localeCompare() method is used to compare two strings in the current locale. It will return three values i.e, -1,1,0.
String match() in JavaScript
The match() method is used to match a string against a regular expression. It will return an array with the matches if matches are found or else null.
String repeat() in JavaScript
The repeat() method is used to return a string with a number of copies of a string. Each time it will return numbers of new strings and it will not change the original string.
String replace() in JavaScript
The replace() method is used to search a string for a value or a regular expression. It does not have any impact on the original string and will return a new string having replaced values.
String search() in JavaScript
The search() method is used to match a string against a regular expression. It returns the index of the first matched result else it will return -1. This method is case-sensitive.
String slice() in JavaScript
The slice() method is used to extract a part of a string. It will return extracted part in a new string and does not have any effect on the original string. A negative number will start selecting from the end of the string.
String split() in JavaScript
The split() method is used to split a string into an array of substrings. It will return a new array without having any effect on the original string. If the separator is empty with a space, then the string is split between words.
String startsWith() in JavaScript
The startsWith() method is used to return true if a string starts with a specified string else it will return false. This method is case-sensitive.
String substr() in JavaScript
The substr() method is used to extract a part of a string. This method begins at a specified position and returns a specified number of characters. However, it will not change the original string.
String substring() in JavaScript
The substring() method is used to extract characters between two indices from a string and return the substring. It extracts characters from start to end. It does not affect the original string.
String toLocaleLowerCase() in JavaScript
The toLocaleLowerCase() method is used to convert a string to lowercase letters by using the current locale. The locale is based on the language settings of the browser.
String toLocaleUpperCase() in JavaScript
The toLocaleUpperCase() method is used to convert a string to uppercase letters by using the current locale. The locale is based on the language settings of the browser.
String toLowerCase() in JavaScript
The toLowerCase() method is used to convert a string to lowercase letters. It does not have any effect on the original string.
String toString() in JavaScript
The toString() method is used to convert a string object into a string. This method is used to return a string as a string. It will not change the original string.
String toUpperCase() in JavaScript
The toUpperCase() method is used to convert a string to uppercase letters. It does not any effect on the original string.
String trim() in JavaScript
The trim() method is used to remove whitespace from both sides of a string. It will not have any effect on the original string.
String valueOf() in JavaScript
The valueOf() method is used to return the primitive value of a string. It does not have any effect on the original string. It is also used to convert a string object into a string.
String anchor() in JavaScript
The anchor method is used to return a string embedded in an a tag.
String big() in JavaScript
The big() method is used to return a string embedded in a < big > tag.
String blink() in JavaScript
The blink() method is used to return a string embedded in a < blink > tag.
String bold() in JavaScript
The bold() method is used to return a string embedded in a < bold > tag.
String fixed() in JavaScript
The fixed() method is used to return a string embedded in a < tt > tag.
String fontcolor() in JavaScript
The fontcolor() method is used to return a string embedded in a < font > tag.
String fontsize() in JavaScript
The fontsize() method is used to return a string embedded in a < font > tag.
String italics() in JavaScript
The italics() method is used to return a string embedded in a < i > tag.
String link() in JavaScript
The link() method is used to return a string embedded in a < a > tag.
String small() in JavaScript
The small() method is used to return a string embedded in a < small > tag.
String strike() in JavaScript
The strike() method is used to return a string embedded in a < strike > tag.
String sub() in JavaScript
The sub() method is used to return a string embedded in a < sub > tag.
String sup() in JavaScript
The sup() method is used to return a string embedded in a < sup > tag.
String constructor in JavaScript
The constructor property is used to return the function that created the String prototype. Its return is function String() { [native code] }.
JavaScript Number Methods and Properties
Number constructor in JavaScript
The constructor property is used to return the function that created the Number prototype.
Number MAX_VALUE in JavaScript
The Number.MAX_VALUE property is used to return the largest number possible in JavaScript. Its value is 1.7976931348623157e+308. It is a property of the JavaScript Number object.
Number MIN_VALUE in JavaScript
The Number.MIN_VALUE property is used to return the smallest number possible in JavaScript. Its value is 5e-324.
Number NEGATIVE_INFINITY in JavaScript
The Number.NEGATIVE_INFINITY property is used to return negative infinity. It is a number lower than any other number. It is a property of JavaScript Number Object.
Number NaN in JavaScript
NaN is a short form of Not-a-Number. It is an illegal number i.e, not a legal number. The Number.Nan property is very much similar to the Global NaN property.
Number POSITIVE_INFINITY in JavaScript
The POSITIVE_INFINITY property is used to return positive infinity. It is a number that is higher than any other number. It is the property of the JavaScript Number object.
Number prototype in JavaScript
The prototype property is used to add new properties and methods to numbers. It is available for all JavaScript objects.
Number isFinite() in JavaScript
The Number.isFinite() method is used to return true if a number is a finite number else it will return false. Some infinite numbers are Infinity, -Infinity, and NaN
Number isInteger() in JavaScript
The Number.isInteger() method is used to return true if a value is an integer of the given datatype Number else it will return false.
Number isNaN() in JavaScript
The Number.isNaN() method is used to return true if the value is NaN and the type is a Number else it will return false. NaN is a short form of Not-a-Number. It is an illegal number i.e, not a legal number.
Number isSafeInteger() in JavaScript
The Number.isSafeInteger() method is used to return true if a number is a safe integer else it will return false. The range of safe integer is (253 - 1) to -(253 - 1).
Number toExponential() in JavaScript
The toExponential() method is used to convert any number into an exponential notation.
Number toFixed() in JavaScript
The toFixed() method is used to convert a number to a string. It rounds the string to a specific number of decimals.
Number toLocaleString() in JavaScript
The toLocaleString() method is used to return a number as a string by using the local language format. It all depends upon the locale setup on the computer.
Number toPrecision() in JavaScript
The toPrecision() method is used to format a number to the specified length. If the length is more than the number then the decimal points and nulls are added to the number to format it to the precise length.
Number toString() in JavaScript
The toString() method is used to return a number as a string. Each object in JavaScript has a toString() method. It is used when we need to display a number as a string.
Number valueOf() in JavaScript
The valueOf() method is used to return the primitive value of a number.
JavaScript Math Properties and Methods
Math.E in JavaScript
The Math.E property is used to return the Euler number. The base of natural logarithms is 2.718.
Math.LN2 in JavaScript
The Math.LN2 property is used to return the natural logarithm of 2. Its value is approximately 0.693.
Math.LN10 in JavaScript
The Math.LN10 property is used to return the natural logarithm of 10. Its value is approximately 2.302.
Math LOG2E in JavaScript
The Math.LOG2E property is used to return the base-2 logarithm of E. Its approximate value is 1.442.
Math.LOG10E in JavaScript
The Math.LOG10E property is used to return the base-10 logarithm of E. Its approximate value is 0.434.
Math.PI in JavaScript
The Math.PI property return PI which is the ratio of a circle area to the square of its radius. Its approximate value is 3.14.
Math.SQRT1_2 in JavaScript
The Math.SQRT1_2 property is used to return the square root of 1/2. Its approximate value is 0.707.
Math.SQRT2 in JavaScript
The Math.SQRT2 property is used to return the square root of 2. Its approximate value is 1.414.
Math.abs() in JavaScript
The Math.abs() method is used to return the absolute value of a number.
Math.acos() in JavaScript
The Math.acos() method is used to return the arccosine of a number as value between 0 and PI radians. It will return -1 when the value is PI.
Math.acosh() in JavaScript
The Math.acosh() method is used to return the hyperbolic arccosine of a number. It will return NaN when the parameter value is less than 1.
Math.asin() in JavaScript
The Math.asin() method is used to return the arcsine of a number as a value between PI/2 and -PI/2 radians. It will return Nan when parameter is outside of 1 to -1.
Math.asinh() in JavaScript
The Math.asinh() method is used to return the hyperbolic arcsine of a number.
Math.atan() in JavaScript
The Math.atan() method is used to return the arctangent of a number. Its value is between -PI/2 and PI/2 radians.
Math.atan2() in JavaScript
The Math.atan2() method is used to return the arctangent of the quotient of its arguments. Its value is between PI and -PI radians.
Math.atanh() in JavaScript
The Math.atanh() method is used to return the hyperbolic arctangent of a number. If the value of the parameter is 1 then it will return infinity.
Math.cbrt() in JavaScript
The Math.cbrt() method is used to return the cubic root of a number.
Math.ceil() in JavaScript
The Math.ceil() method is used to round a number upwards to the nearest integer and then return the result.
Math.clz32() in JavaScript
The Math.clz32() method is used to return the number of leading zeros in a 32-bit binary representation of a number.
Math.cos() in JavaScript
The Math.cos() method is used to return the cosine of a number. It returns a value between 1 and -1.
Math.cosh() in JavaScript
The Math.cosh() method is used to return the hyperbolic cosine of a number.
Math.exp() in JavaScript
The Math.exp() method is used to return the value of Ex, where E is the Euler number and x is the number passed to it.
Math.expm1() in JavaScript
The expm1() method is used to return the value of Ex minus 1 where E is the Euler number and x is the number passed to it.
Math.floor() in JavaScript
The Math.floor() method is used to round a number downwards to the nearest integer and then returns the result.
Math.fround() in JavaScript
The Math.fround() method is used to return the nearest 32-bit float representation of a number.
Math.log() in JavaScript
The Math.log() method is used to return the natural logarithm to the base E of a number.
Math.log10() in JavaScript
The Math.log10() method is used to return the logarithm to the base 10 of a number.
Math.log1p() in JavaScript
The Math.log1p() method is used to return the natural logarithm to the base E of 1 + a number.
Math.log2() in JavaScript
The Math.log2() method is used to return the logarithm to the base 2 of a number.
Math.max() in JavaScript
The Math.max() method is used to return the number with the highest value. Its opposite function is Math.min() which returns the minimum value among all values.
Math.min() in JavaScript
The Math.min() method is used to return the number with the smallest value. Its opposite function is Math.max() which returns the maximum value among all values.
Math.pow() in JavaScript
The Math.pow() method returns the value of x to the power of y. In other words, xy.
Math.random() in JavaScript
The Math.random() method is used to return a random number between 0 and 1.
Math.round() in JavaScript
The Math.round() method is used to round a number to the nearest integer.
Math.sign() in JavaScript
The Math.sign() method is used to return whether a number is negative, positive, or zero. It will return 1 if the number is positive, it will return -1 if the number is negative and it will return 0 for zero.
Math.sin() in JavaScript
The Math.sin() method is used to return the sine of an angle which is given in radians. Its return value ranges from -1 to 1. It measures the angle of the amount of rotation from the initial side to the terminal side.
Math.sinh() in JavaScript
The Math.sinh() method is used to return the hyperbolic sine of a number.
Math.sqrt() in JavaScript
The Math.sqrt() method is used to return the square root of a number.
Math.tan() in JavaScript
The Math.tan() method is used to return the tangent of a number.
Math.tanh() in JavaScript
The Math.tanh() method is used to return the hyperbolic tangent of a number.
Math.trunc() in JavaScript
The Math.trunc() method is used to return the integer part of a number. It will not round up or down the number. It will just simply remove the decimals.
JavaScript Date Methods and Properties
Date constructor in JavaScript
The constructor property is used to return the function that created the Date prototype. This property return function Date() { [native code] }.
Date prototype in JavaScript
The prototype property is used to add new properties and methods to dates. It is available for all JavaScript objects.
Date getDate() in JavaScript
The getDate() method is used to return the day of the month i.e, 1 to 31 of the date.
Date getDay() in JavaScript
The getDay() method is used to return the day of the week i.e, from 0 to 6 of the date. Here, 0 is Sunday and 6 is Saturday.
Date getFullYear() in JavaScript
The getFullYear() method is used to return the full year 4 digits of a date.
Date getHours() in JavaScript
The getHours() method is used to return the hour of date from 0 to 23.
Date getMilliseconds() in JavaScript
The getMilliseconds() method is used to return the milliseconds of a date i.e, from 0 to 999.
Date getMinutes() in JavaScript
The getMinutes() method is used to return the minutes of a date i.e, from 0 to 59.
Date getMonth() in JavaScript
The getMonth() method is used to return the month of a date i.e, from 0 to 11. In this, January start from 0 and so on.
Date getSeconds() in JavaScript
The getSeconds() method is used to return the seconds of a date i.e, from 0 to 59.
Date getTime() in JavaScript
The getTime() method is used to return the number of milliseconds from January 1, 1970 00:00:00.
Date getTimezoneOffset() in JavaScript
The getTimezoneOffset() method is used to return the difference between UTC time and local time. It returns the difference in minutes.
Date getUTCDate() in JavaScript
The getUTCDate() method is used to return the day of the month of a date object i.e, from 1 to 31. It returns the value according to UTC.
Date getUTCDay() in JavaScript
The getUTCDay() method is used to return the day of the week of a date i.e, from 0 to 6. It returns value according to universal time.
Date getUTCFullYear() in JavaScript
The getUTCFullYear() method is used to return the year of date according to UTC and in four digits.
Date getUTCHours() in JavaScript
The getUTCHours() method is used to return the hour of date from 0 to 23 according to UTC.
Date getUTCMilliseconds() in JavaScript
The getUTCMilliseconds() method is used to return the milliseconds of date from 0 to 999 according to UTC.
Date getUTCMinutes() in JavaScript
The getUTCMinutes() method is used to return the minutes of date from 0 to 59 according to UTC.
Date getUTCMonth() in JavaScript
The getUTCMonth() method is used to return the month of date from 0 to 11 according to UTC. In this, 0 is for January, 1 is for February, and so on.
Date getUTCSeconds() in JavaScript
The getUTCSeconds() method is used to return the seconds of date from 0 to 59 according to UTC.
Date.now() in JavaScript
The Date.now() method is used to return the number of milliseconds since January 1, 1970. It is a static method of Date Object.
Date parse() in JavaScript
The parse() method is used to parse a date string and returns the time difference since January 1, 1970. Its return value is in milliseconds.
Date setDate() in JavaScript
The setDate() method is used to set the day of the month of a date.
Date setFullYear() in JavaScript
The setFullYear() method is used for setting the year of a date. We can also set a month and day with it.
Date setHours() in JavaScript
The setHours() method is used to set the hour of a date. It can also be used to set minutes, seconds, and milliseconds.
Date setMilliseconds() in JavaScript
The setMilliseconds() method is used to set the milliseconds of a date.
Date setMinutes() in JavaScript
The setMinutes() method is used for setting the minutes of a date. It can also be used to set the seconds and milliseconds.
Date setMonth() in JavaScript
The setMonth() method is used for setting the month of a date object. It can also be used to set the day of the month. In this, 0 is January, 1 is February, and so on.
Date setSeconds() in JavaScript
The setSeconds() method is used for setting the seconds of a date object. It can also be used to set milliseconds.
Date setTime() in JavaScript
The setTime() method is used to set a date and time by adding or subtracting a specified number of milliseconds to/from January 1, 1970, 00:00:00.
Date setUTCDate() in JavaScript
The setUTCDate() method is used to set the day of a Date object according to UTC. It is a static method of Date Object.
Date setUTCFullYear() in JavaScript
The setUTCFullYear() method is used to set the year of a date object according to UTC. It is also used to set the month and date.
Date setUTCHours() in JavaScript
The setUTCHours() method is used for setting the hour of a date object according to UTC. We can also use it to set the minutes, seconds, and milliseconds.
Date setUTCMilliseconds() in JavaScript
The setUTCMilliseconds() method is used for setting the milliseconds of a date object according to UTC from 0 to 999.
Date setUTCMinutes() in JavaScript
The setUTCMinutes() method is used for setting the minutes of a date object according to UTC. It can also be used to set seconds and milliseconds.
Date setUTCMonth() in JavaScript
The setUTCMonth() method is used for setting the month of a date object according to UTC from 0 to 11. We can also use it to set the day of the date.
Date setUTCSeconds() in JavaScript
The setUTCSeconds() method is used to set the seconds of a date object according to UTC. We can also use this method to set milliseconds.
toDateString() Method in JavaScript
The toDateString() method is used to return the date part of a date object as a string. It will skip the time part of the date object.
Date toISOString() in JavaScript
The toISOString() method is used to return a date object as a string using the ISO standard. The format is YYYY-MM-DDTHH:mm:ss.sssZ.
Date toJSON() in JavaScript
The toJSON() method is used to return a date object as a string in a JSON data format. Its format is YYYY-MM-DDTHH:mm:ss.sssZ.
Date toLocaleDateString() in JavaScript
The toLocaleDateString() method is used to return the date part of a date object as a string by using locale conventions. It will skip the time part of the date object.
Date toLocaleTimeString() in JavaScript
The toLocaleTimeString() method is used to return the time part of a date object as a string by using locale conventions. It will skip the date part of the date object.
Date toLocaleString() in JavaScript
The toLocaleString() method is used to return a Date object as a string by using locale settings. In the end, it all depends on the default language set locally on your computer.
Date toTimeString() in JavaScript
The toTimeString() method is used to return the time part of a date object as a string.
Date toUTCString() in JavaScript
The toUTCString() method is used to return a date object as a string according to UTC which is basically Universal Coordinated Time and is the same as GMT time.
Date.UTC() in JavaScript
The Date.UTC() method is used to return the number of milliseconds between a specific date and January 1, 1970, according to UTC.
Date valueOf() in JavaScript
The valueOf() method is used to return the primitive value of a date object. It is a number of milliseconds since January 1, 1970, UTC.
JavaScript Global Methods and Properties
Infinity in JavaScript
The Infinity global property is a number that represents infinity. Infinity can be positive and negative. The positive infinity is 1.797693134862315E+308 while the negative infinity is -1.797693134862316E+308.
NaN in JavaScript
The NaN global property is a number that is not a legal number. NaN stands for Not-a-Number. It is the same as Number.NaN property.
undefined in JavaScript
The undefined global property is used to indicate that a variable has not been declared at all or is not assigned a value.
decodeURI() in JavaScript
The decodeURI() global method decodes a URI. It is the opposite of encodeURI() global method.
decodeURIComponent() in JavaScript
The decodeURIComponent() global method is used to decode a URI component. Its opposite is encodeURIComponent() global method.
encodeURI() in JavaScript
The encodeURI() global method is used for encoding a URI. Its opposite is decodeURI() global method. Some letters that are skipped by encodeURI() are , / ? : @ & = + $ * #
encodeURIComponent() in JavaScript
The encodeURIComponent() global method is used for encoding a URI component. Its opposite global method is decodeURIComponent(). Some characters that are skipped are , / ? : @ & = + $ #.
eval() in JavaScript
The eval() global method is used to execute or evaluate an argument. If the argument is one or more statements, then it will execute them. If the argument is one or more expressions, then it will evaluate them.
isFinite() in JavaScript
The isFinite() global method is used to return true if a value is a finite number else it will return false. Infinite numbers are +infinity, -infinity, and NaN. The Number.isFinite() returns true if a number is a finite number.
isNaN() in JavaScript
The isNaN() global method is used to return true if a value is NaN or else false. NaN stands for Not-a-Number. It converts the value into a number before testing it. Number.isNaN() is used to return true if a number is Not-a-Number.
Number() in JavaScript
The Number() global method is used for converting a value to a number. If the value cannot be changed, then it will return NaN.
parseFloat() in JavaScript
The parseFloat() global method is used to parse a value as a string and returns the first number. If the first character cannot be converted, then NaN is returned.
parseInt() in JavaScript
The parseInt() global method is used to parse a value as a string and returns the first integer. It has a parameter radix which is optional and which is used to specify the number system to use i.e, 2, 8, 16, or any other.
String() in JavaScript
The String() global method is used to convert a value to a string. It is similar to toString() method.
JavaScript RegExp Properties and Methods
RegExp constructor Property in JavaScript
The constructor property is used for returning the function that created the RegExp prototype. It return is function RegExp() { [native code] }
RegExp global in JavaScript
The global property is used for specifying whether the g modifier is set or not. If it is set then it will return true or else false.
RegExp ignoreCase in JavaScript
The ignoreCase property is used for specifying whether i modifier is set or not. If it is set then it will return true or else false.
lastIndex Property in JavaScript
The lastIndex property is used for specifying the index at which to start the next match. It will return an integer that is used to specify character position immediately after the last match is found.
multiline Property in JavaScript
The multiline property is used for specifying whether the m modifier is set or not. It will return true if set else false.
source Property in JavaScript
The source property is used to return the text of the RegExp pattern.
RegExp exec() in JavaScript
The exec() method is used to test for a match in a string. If a match is found, it will return a result array else it will return null.
RegExp test() in JavaScript
The test() method is used to test for a match in a string. If a match is found, it will return true or else false.
RegExp toString() in JavaScript
The toString() method is used to return the string value of the regular expression.
RegExp g Modifier in JavaScript
The g modifier is used for specifying the global match. In this modifier, it will find all matches but compared to only the first match.
RegExp i Modifier in JavaScript
The i modifier is used for specifying the case-insensitive match. In this, it will ignore cases like capital or small and just search for the specified value
RegExp m Modifier in JavaScript
The m modifier is used for specifying the multiline match. In this, $ is used to specify the match at end of the string while ^ is used to specify the match at the start of the string.
RegExp Group [abc] in JavaScript
Brackets [abc] are used for specifying matches for the characters inside the brackets. Brackets may contain groups, single characters, etc.
RegExp Group [^abc] in JavaScript
Brackets [^abc] are used to specify matches for any character NOT between the brackets. Brackets may contain groups, single characters, etc.
RegExp Group [0-9] in JavaScript
The [0-9] bracket expression is used to find any character between the brackets. The numbers inside brackets specify nunbers from 0 to 9.
RegExp Group [^0-9] in JavaScript
The [^0-9] bracket expression is used to find any character that is not a digit. The numbers inside brackets specify numbers from 0 to 9.
RegExp Group (x|y) in JavaScript
The (x|y) expression is used for finding any of the alternatives specified. It can be any character.
RegExp . Metacharacter in JavaScript
The . metacharacter is used for matching any character except line terminators or newline.
RegExp \w Metacharacter in JavaScript
The \w metacharacter is used to match word characters. Word characters are from a-z, A-Z, 0-9.
RegExp \W Metacharacter in JavaScript
The \W metacharacter is used for matching non-word characters. Word characters are from a-z, A-Z, 0-9.
RegExp \d Metacharacter in JavaScript
The \d metacharacter is used for matching digits from 0 to 9.
RegExp \D Metacharacter in JavaScript
The \D metacharacter is used for matching non-digits characters.
RegExp \s Metacharacter in JavaScript
The \s metacharacter is used for matching the whitespace characters.
RegExp \S Metacharacter in JavaScript
The \S metacharacter is used for matching non-whitespace characters.
RegExp \b Metacharacter in JavaScript
The \b metacharacter is used for matching at the beginning or end of a word. For beginning we use \b{word} while for end we use {word}\b.
RegExp \B Metacharacter in JavaScript
The \B metacharacter is used for matching not at the beginning or end of a word. For searching, not a beginning we use \B{word} while for searching not at the end we use {word}\B.
RegExp \0 Metacharacter in JavaScript
The \0 metacharacter is used for matching NULL characters.
RegExp \n Metacharacter in JavaScript
The \n character is used for matching newline characters.
RegExp \f Metacharacter in JavaScript
The \f metacharacter is used for matching form feed characters.
RegExp \r Metacharacter in JavaScript
The \r metacharacter is used for matching carriage return characters.
RegExp \t Metacharacter in JavaScript
The \t metacharacter is used for matching the horizontal tabs.
RegExp \v Metacharacter in JavaScript
The \v metacharacter is used for matching vertical tab characters.
RegExp \xxx Metacharacter in JavaScript
The \xxx metacharacters are used for matching the Latin character by an octal number.
RegExp \xdd Metacharacter in JavaScript
The \xdd metacharacters are used for matching Latin characters specified by a hexadecimal number.
RegExp \udddd Metacharacter in JavaScript
The \udddd metacharacters are used for matching Unicode characters specified by a hexadecimal number.
RegExp + Quantifier in JavaScript
The n+ quantifier is used for matching any string that contains at least one n.
RegExp * Quantifier in JavaScript
The n* quantifier is used for matching any string that contains zero or more occurrences of n.
RegExp ? Quantifier in JavaScript
The n? quantifier is used for matching any string that contains zero or one occurrence of n.
RegExp {X} Quantifier in JavaScript
The n{X} quantifier is used for matching any string that contains a sequence of X. In it, X must be a number.
RegExp {X,Y} Quantifier in JavaScript
The n{X,Y} quantifier is used for matching any string that contains a sequence of X to Y. In it, X and Y must be a number.
RegExp {X,} Quantifier in JavaScript
The n{X,} quantifier is used for matching any string that contains a sequence of at least X. In it, X must be a number.
RegExp $ Quantifier in JavaScript
The n$ quantifier is used for matching any string with n at the end of it. Its opposite quantifier is ^n.
RegExp ^ Quantifier in JavaScript
The ^n quantifier is used for matching any string with n at the beginning of it. Its opposite quantifier is n$.
RegExp ?= Quantifier in JavaScript
The ?=n quantifier is used for matching any string that is followed by a specific string n. Its opposite is ?!n.
RegExp ?! Quantifier in JavaScript
The ?!n quantifier is used for matching any string that is not followed by a specific string n. Its opposite is ?=n.
JavaScript Class Methods and Keywords
Class constructor in JavaScript
The constructor() method in a class is used for initializing and creating objects created within a class. It is automatically called when a class is initiated.
Class extends in JavaScript
Whenever we want to create a child class of another class i.e, parent, we use the extends keyword. The child class will inherit all of its properties and methods from its parent class.
Class static in JavaScript
The static keyword is used to define static methods for classes. It is called directly on the class without the need of creating an instance or object of the class.
Class super in JavaScript
The super keyword is used for calling the constructor of its parent class and to access its properties and methods. This phenomenon happens in inheritance. It is useful for code reusability.
JavaScript Errors, JSON and Booleans
Error name in JavaScript
The name property is used to either set or return the name of an error.
Error message in JavaScript
The message property is used to either set or return an error message.
Boolean constructor in JavaScript
The constructor property is used for returning the function that created the Boolean prototype. Its return is function Boolean() { [native code] }
Boolean prototype in JavaScript
The prototype property is used to allow us to add new properties and methods to booleans. This property is applicable to all JavaScript objects.
Boolean toString() in JavaScript
The toString() method is used to return a boolean as a string. Every JavaScript object has a toString() method.
Boolean valueOf() in JavaScript
The valueOf() property is used for returning the primitive value of a boolean. It is called behind the script by JavaScript.
JSON parse() Method in JavaScript
The JSON.parse() method is used for parsing a string and returns a JavaScript object. The string must be present in JSON format.
JSON stringify() Method in JavaScript
The JSON.stringify() method is used to convert a JavaScript object into strings. It is necessary because when sending data on the web server, it should be in the form of a string.
JavaScript Statements
break in JavaScript
The break statement is used to break out of a switch or a loop. In a loop, it breaks out of the loop and continues executing code after the loop.
class in JavaScript
The class statement is used to initialize a JavaScript class. It is a type of object template. Its constructor() method is called each time a class object is initialized.
const in JavaScript
As we know, variables are containers for storing information. The const statement is used for declaring a variable. Creating a variable is similar to declaring a variable.
continue in JavaScript
The continue statement is used for breaking only one iteration in the loop if a specified condition occurs and continues with the next iteration in the loop.
debugger in JavaScript
The debugger statement is used to stop the execution of JavaScript and calls the debugger. It will not have any effect if no debugging is available.
do...while Loop in JavaScript
The do...while statement is used to define a code block to be executed once and then repeated as long as a condition is true. It is required when we want the code to run at least one time
for Loop in JavaScript
The for statement is used to define a block of code that is executed as long as a condition is true.
for...in Loop in JavaScript
The for...in statements is used to iterate the loops over the properties of an object. Whatever code is present inside of a block, will be executed once for each property.
for...of Loop in JavaScript
The for...of statements is used to iterate loops over the values of any iterable. Whatever code is present inside of a block, will be executed once for each value.
function in JavaScript
The function statement is used for declaring a function. Its main purpose is for reusability. Without it, we have to write the same code multiple times for different inputs.
if...else in JavaScript
The if/else statement is used for executing a block of code if a specific condition is true. If the condition returns false then another block of code can be executed.
let in JavaScript
Variables are containers that are used for storing information. The let statement is used for declaring a variable. Creating and declaring a variable are the same.
return in JavaScript
The return statement is used to stop the execution of a function and returns a value. Code present after the return will not be executed if the return condition is true.
switch Statement in JavaScript
The switch statement is used for executing a block of code depending on different cases. It is part of JavaScript Conditional Statements which perform different actions under different conditions.
throw in JavaScript
The throw statement is used to throw/generate an error. It allows us to create our own custom errors. In other words, we can say that the throw statement throws an exception.
try...catch...finally in JavaScript
The try...catch...finally statements are used to handle errors without stopping JavaScript from executing.
var in JavaScript
Variables are containers that are used for storing information. The var statement is used for declaring a variable. Creating and declaring a variable are the same.
while Loop in JavaScript
The while statement is used for creating a loop that is executed while a condition is true. When the condition becomes false, the loop will end.
JavaScript Window History Object Properties and Methods
Windows history.length in JavaScript
The length property is used for returning the number of URLs in the history list of the current browser window. Its least value is 1 because the list includes the current page.
Window history.back() in JavaScript
The history.back() method is used for loading the previous URL i.e, the page in the history list. It only works if the previous page exists.
Window history.forward() in JavaScript
The history.forward() method is used for loading the next URL i.e, the page in the history list. It only works if the next page exists.
Window history.go() in JavaScript
The history.go() method is used for loading a URL i.e, a page from the history list. It is only usable when a page exists in the history list. The history.go(0) is used for reloading the page.
JavaScript Window Location Object Properties and Methods
Window location.assign() in JavaScript
The assign() method is used for loading a new document. It is similar to replace() method.
Window location.reload() in JavaScript
The reload() method is used for reloading the current document i.e, page. It does the same job as reload button in the browser.
Window location.replace() in JavaScript
The replace() method is used for replacing the current document with a new one. It is similar to the assign().
Window location.hash in JavaScript
The location.hash property is used to either set or returns the anchor part of a URL. It also includes the hash sign (#). Do not include a hash (#)  when we want to set the anchor part in location.hash .
Window location.host in JavaScript
The location.host property is used to return the host IP address or domain and port of a URL. We can also set it in order to navigate the same URL but with a different host and port.
Window location.hostname in JavaScript
The location.hostname property is used to return the host IP adress or domain of a URL. We can also set it in order to navigate the same URL but with a different hostname.
Window location.href in JavaScript
The location.href property is used to either set or return the entire URL of the current page.
Window location.origin in JavaScript
The location.origin property is used to return the protocol, hostname, and port number of a URL and it is a read-only property.
Window location.pathname in JavaScript
The location.pathname property is used to either set or return the pathname of a URL i.e, page.
Window location.port in JavaScript
The location.port property is used to either set or return the port number of a URL. If the default port is 80(http) or 443(https), then most browsers will return an empty string.
Window location.protocol in JavaScript
The location.protocol property is used to either set or return the protocol of the current URL. It also includes the colon (:). It is a standard that is used to specify how data are transmitted between computers.
Window location.search in JavaScript
The search property is used to return the querystring part of a URL. It also includes the question mark (?). We can also use it to set the querystring.
JavaScript Window Screen Object Properties
Window screen.pixelDepth in JavaScript
The pixelDepth property is used to return the screen color depth. It returns depth in bits per pixel. It is a read-only property.
Window screen.width in JavaScript
The width property is used to return the total width of the user screen. It returns width in pixels. It is a read-only property.
Window screen.availHeight in JavaScript
The availHeight property is used to return the height of the user screen. It will return height in pixels. It returns height minus interfaces like window tabs, taskbars, etc.
Window screen.availWidth in JavaScript
The availWidth property is used to return the width of the user screen. It will return width in pixels. It returns width minus interfaces like window tabs, taskbars, etc. It is a read-only property.
Window screen.colorDepth in JavaScript
The colorDepth property is used to return the screen color depth. It returns depth in bits per pixel. It is a read-only property.
Window screen.height in JavaScript
The height property is used to return the total height of the user screen. It returns height in pixels. It is a read-only property.
JavaScript Window Navigator Object Properties and Methods
Window navigator.javaEnabled() in JavaScript
The javaEnabled() method is used to return a Boolean value that is used to specify whether the browser has Java enabled or not.
Window navigator.appCodeName in JavaScript
The appCodeName property is used to return the browser code name. It is a read-only property and it returns Mozilla on all browsers because of compatibility reasons.
Window navigator.appName in JavaScript
The appName property is used to return the browser name. It is a read-only property and it returns Netscape on all browsers because of compatibility reasons.
Window navigator.appVersion in JavaScript
The appVersion property is used to return the browser version. It is a read-only property.
Window navigator.cookieEnabled in JavaScript
The cookieEnabled property is used to return true if cookies are enabled in the browser else it will return false.
Window navigator.geolocation in JavaScript
The geolocation property is used to return a Geolocation object which is used to locate the user position. It is a read-only property and is available only in secure contexts (HTTPS).
Window navigator.language in JavaScript
The language property is used to return the browser language. It is a read-only property.
Window navigator.onLine in JavaScript
The onLine property is used to return true if the browser is online else it will return false. It is a read-only property.
Window navigator.platform in JavaScript
The platform property is used to return for which platform the browser is compiled. It is a read-only property.
Window navigator.product in JavaScript
The product property is used for returning the browser engine which is basically its product name. It is a read-only property.
Window navigator.userAgent in JavaScript
The userAgent property is used to return the user-agent header sent by the browser to the server. It is a read-only property.
JavaScript Window Object Properties and Methods
Window alert() in JavaScript
The alert() method is used to display an alert box with a message and an OK button. It is done in order to send information to the user.
Window atob() in JavaScript
The atob() method is used to decode a base-64 encoded string. It is used to decode a string that has been encoded by the btoa() method.
Window blur() in JavaScript
The blur() method is used to remove focus from a window. It is the opposite of the focus() method in which we set focus on the window.
Window btoa() in JavaScript
The btoa() method is used to encode a base-64 string. It  uses the A-Z, a-z, 0-9, +, / and = characters to encode the string. Its opposite is atob() which is used to decode the base-64 string.
Window clearInterval() in JavaScript
The clearInterval() method is used to clear a timer set with the setInterval() method. For setting a function to execute after a certain amount of time, we use the setInterval() method.
Window clearTimeout() in JavaScript
The clearTimeout() method is used to clear a timer set with the setTimeout() method. Whenever we want a function to execute for once after a certain amount of time, we use the setTimeout() method.
Window close() in JavaScript
The close() method is used to close a window. Its opposite is the open() method which is used for the opening window.
Window confirm() in JavaScript
The confirm() method is used to display a dialog box with a message, OK button, and Cancel button. It returns true if the user clicked on the OK button else it will return false.
Window focus() in JavaScript
The focus() method is used to set focus to a window. It is the opposite of the blur() method in which we remove focus on the window.
Window getComputedStyle() in JavaScript
The getComputedStyle() method is used to get the computed CSS properties and values of an HTML element. It returns CSSStyleDeclaration object.
Window matchMedia() in JavaScript
The matchMedia() method is used to return a MediaQueryList with the results from the query. The media queries of the matchMedia() method is any media features of the CSS @media rule.
Window moveBy() in JavaScript
The moveBy() method is used to move a window a number of pixels relative to its current coordinates.
Window moveTo() in JavaScript
The moveTo() method is used to move a window to the specific coordinates.
Window open() in JavaScript
The open() method is used to open a new browser window or new tab. It depends on browser settings and the parameter values.
Window print() Method in JavaScript
The print() method is used to print the contents of the current window. It will open the Print Dialog Box in which users select preferred printing options.
Window prompt() in JavaScript
The prompt() method is used to display a dialog box that prompts the user for input. If the user clicks OK button, then it will return the user response i.e, their input else it will return null.
Window resizeBy() in JavaScript
The resizeBy() method is used for resizing windows by a specified amount. Its similar method is resizeTo().
Window resizeTo() in JavaScript
The resizeTo() method is used for resizing a window to a new width and height. Its similar method is resizeBy() method.
Window scrollBy() in JavaScript
The scrollBy() method is used for scrolling the document to the specified number of pixels. This property only works when the document is larger than the screen.
Window scrollTo() in JavaScript
The scrollTo() method is used for scrolling the document to the specified coordinates. This property only works when the document is larger than the screen.
Window setInterval() in JavaScript
The setInterval() method is used for calling a function at specified intervals in milliseconds. It continues calling the method until clearInterval() is called or otherwise, the window is closed.
Window setTimeout() in JavaScript
The setTimeout() method is used to call a function after a number of milliseconds. It will only call once and will not repeat like in setInterval().
Window stop() in JavaScript
The stop() method is used for stopping the window loading. It is the same as clicking the STOP button in the browser.
Window closed in JavaScript
The closed property is used to return true if the window is closed else it will return false. It is a read-only property.
Window Console Object in JavaScript
The console object is used to provide access to the browser debugging console. It is a very important property of the window object.
Window Document in JavaScript
The document object is the root node of the HTML document. It is a very important property of a window object.
Window frameElement in JavaScript
The frameElement property is used to return the frame in which the window runs. It returns NULL when the window does not run in the frame. It is a read-only property
Window frames in JavaScript
The frames property is used to return an array with all window objects in the window. We can access it by index numbers and the first index starts from 0. It is a read-only property.
Window History in JavaScript
The history object contains all the URLs that a user visits in the current browser window. It is a very important property of a window object.
Window innerHeight in JavaScript
The innerHeight property is used to return the height of a window content area. Some similar properties are innerWidth Property, outerWidth Property, and outerHeight Property.
Window innerWidth in JavaScript
The innerWidthproperty is used to return the width of a window content area. Some similar properties are innerHeight Property, outerWidth Property, and outerHeight Property. It is a read-only property.
Window length in JavaScript
The length property is used to return the number of window frames in the window. We can access each window by its index number. The first index starts from 0. It is a read-only property.
Window localStorage in JavaScript
The localStorage object is used to save key/value pairs in the browser. It allows us to do this without any expiration date on the localStorage object.
Window Location in JavaScript
The location object is used to contain information about the current URL. It is a very important object in the window object.
Window name in JavaScript
The name property is used for either setting the name of the window or returning the name of the window.
Window Navigator in JavaScript
The navigator object is used to contain information about the browser. It is a very important property of the window object.
Window opener Property in JavaScript
The opener property is used to return a reference to the window that created the window. In other words, if window aa opens window bb, then bb.opener returns aa.
Window outerHeight in JavaScript
The outerHeight property is used to return the outer height of the browser window which includes all interface elements like taskbars, toolbars, and scrollbars. It is a read-only property.
Window outerWidth in JavaScript
The outerWidth property is used to return the outer width of the browser window which includes all interface elements like taskbars, toolbars, and scrollbars. It is a read-only property.
Window pageXOffset in JavaScript
The pageXOffset property is used to return the pixels a document has scrolled from the top left corner of the window. This property is equal to the scrollX property. It is a read-only property.
Window pageYOffset in JavaScript
The pageYOffset property is used to return the pixels a document has scrolled from the upper left corner of the window. This property is equal to the scrollY property.
Window parent in JavaScript
The parent property is used for returning the parent window of the currently active window. It is a read-only property.
Window Screen in JavaScript
The screen object is used to contain information about the visitor screen. It is a very important property of a window object.
Window screenLeft in JavaScript
The screenLeft property is used to return the horizontal position of a window. It is relative to the screen. Its similar properties are screenTop Property, screenX Property, and screenY Property.
Window screenTop in JavaScript
The screenTop property is used to return the vertical position of a window. It is relative to the screen.
Window screenX in JavaScript
The screenX property is used to return the horizontal (x) coordinate of a window. It is relative to the screen. Its similar properties are screenTop Property, screenLeft Property, and screenY Property.
Window screenY in JavaScript
The screenY property is used to return the vertical (y) coordinate of a window. It is relative to the screen. Its similar properties are screenTop Property, screenLeft Property, and screenX Property.
Window sessionStorage in JavaScript
The sessionStorage object allows us to store data in the form of key/value pairs in the browser. It stores data for only one session and when the browser is closed, all the data present in the sessionStorage is deleted.
Window scrollX in JavaScript
The scrollX property is used to return the pixels a document has scrolled from the upper left corner of the window. This property is equal to the pageXOffset property. It is a read-only property.
Window scrollY in JavaScript
The scrollY property is used to return the pixels a document has scrolled from the upper left corner of the window. This property is equal to the pageYOffset property. It is a read-only property.
Window self Property in JavaScript
The self property is used to return the current window. We can use it for comparisons between different windows. It is a read-only property.
Window top Property in JavaScript
The top property is used to return the top most window in the current browser window. It is not similar to parent property and it will return the top most window in the window hierarchy.
JavaScript Console Object Methods
Console assert() in JavaScript
The assert() method is used for writing a message to the console if an expression evaluates to be false.
Console clear() in JavaScript
The clear() method is used for clearing the console. When everything is cleared then it will write a message Console was cleared in the console.
Console count() in JavaScript
The count() method is used for counting the number of times console.count() method is called. We can add a label to it otherwise it is set to the Default label.
Console error() in JavaScript
The error() method is used for writing an error message to the console. It is useful when we are doing testing.
Console group() in JavaScript
The group() method is used for starting a message group. Due to this, all new messages will be written inside this group.
Console groupCollapsed() in JavaScript
The groupCollapsed() method is used for starting a collapsed message group. Due to this, all new messages will now be written inside this group.
Console groupEnd() in JavaScript
The groupEnd() is used for ending a message group. Its similar methods are console.group() Method and console.groupCollapsed() Method.
Console info() in JavaScript
The info() method is used for writing messages to the console.
Console log() in JavaScript
The log() method is used for writing logs i.e, messages to the console. It is necessary when we are doing debugging or testing.
Console table() in JavaScript
The table() method is used for writing the table to the console. The new table can be easily sorted by clicking column names.
Console time() in JavaScript
The time() method is used for starting a timer in the console view. It allows us to time code for testing and debugging purposes.
Console timeEnd() in JavaScript
The timeEnd() method is used for ending the timer. It will write the result to the console. It allows us to time code operations for debugging and testing purposes.
Console trace() in JavaScript
The trace() method is used for displaying traces that shows how the code ended up at a certain point. It is used for testing and debugging purposes.
Console warn() in JavaScript
The warn() method is used for writing a warning to the console. It is used for testing and debugging purposes.
JavaScript Geolocation and Storage APIs
Geolocation coordinates Property in JavaScript
The coordinates property is used to return the position and altitude of the device on Earth. Some of its properties are latitude, longitude, altitude, accuracy, altitudeAccuracy, heading, speed.
Geolocation position Property in JavaScript
The position property is used to return the position and altitude of the device on Earth. Some of its properties are coords, timestamp
Geolocation getCurrentPosition() Method in JavaScript
The getCurrentPosition() method is used to return the current position of the device.
Storage clear() Method in JavaScript
The clear() method is used for removing all the Storage Object items for the current domain. It is a very important method of the Storage Object.
Storage getItem() Method in JavaScript
The getItem() method is used for returning the value of the specified Storage Object item. It is a very important method of the Storage Object.
Storage key() Method in JavaScript
The key() method is used to return the name of the key with the specified index. It is a very important method of the Storage Object.
Storage length Property in JavaScript
The length property is used to return the number of items stored in the browsers Storage Object. It is a very important method of the Storage Object.
Storage setItem() Method in JavaScript
The setItem() method is used for setting the value of the specified Storage Object item. It is a very important method of the Storage Object.
Storage removeItem() Method in JavaScript
The removeItem() method is used for removing the specified Storage Object item. It is a very important method of the Storage Object.
JavaScript CSSStyleDeclaration Object Methods and Properties
CSSStyleDeclaration cssText Property in JavaScript
The cssText property is used to either set or return the value of an element inline style declaration.
CSSStyleDeclaration length Property in JavaScript
The length property is used to return the number of style declarations set for the specified element.
CSSStyleDeclaration parentRule Property in JavaScript
The parentRule property is used to return a CSSRule Object representing a CSS rule-set. It may be a selector and declaration block.
CSSStyleDeclaration getPropertyPriority() Method in JavaScript
The getPropertyPriority() method is used to return if the specified CSS property has the important! priority set or not. If the important qualifier is set, then it will return important else it will return empty string.
CSSStyleDeclaration getPropertyValue() Method in JavaScript
The getPropertyValue() method is used to return the value of the specified CSS property.
CSSStyleDeclaration item() Method in JavaScript
The item() method is used to return a CSS property name from a CSS declaration block. It is done by index number. The index starts at 0 and so on.
CSSStyleDeclaration removeProperty() Method in JavaScript
The removeProperty() method is used to remove the specified CSS property from a CSS declaration block.
CSSStyleDeclaration setProperty() Method in JavaScript
The setProperty() method is used to set a new CSS property or modify an existing one in the CSS declaration block.
HTML DOM Documents Object Properties and Methods
HTML DOM activeElement Property
The activeElement property is used to return the HTML element that is in focus. It is a read-only property.
HTML DOM Document addEventListener() Method
The addEventListener() method is used for attaching an event handler to a document. We can attach the event to every element in the HTML Document.
HTML DOM Document adoptNode() Method
The adoptNode() method is used for adopting nodes from another document. We can assume nodes of any type. When it gets adopted, it also adopts all of its children.
HTML DOM Document baseURI Property
The baseURI property is used to return the base URI of the document. It is read-only property.
HTML DOM Document body property
The body property is used to either return or set a document body element. If we used it for setting purpose it may overwrites the whole body content.
HTML DOM Document characterSet property
The characterSet property is used for returning the character encoding for a document.
HTML DOM Document close() Method
The close() method is used for closing windows previously opened with the open() method. Also, the document.open() method is used for clearing everything in the document i.e, it will overwrite.
HTML DOM Document cookie Property
The cookie property is used for either setting or returning document cookies. It will return the cookie in the form of a semicolon-separated list in key=value pairs.
HTML DOM Document createAttribute() Method
The createAttribute() method is used for creating an attribute and it will return it in the form of an Attr object.
HTML DOM Document createComment() Method
The createComment() method is used for creating a comment and it will return the comment node.
HTML DOM Document createDocumentFragment() Method
The createDocumentFragment() method is used for creating offscreen node. It is used for building new document fragment that can be inserted into any document.
HTML DOM Document createElement() Method
The createElement() method is used for creating an element node.
HTML DOM Document createEvent() Method
The createEvent() method is used for creating an event object. It must be initialized before use and must be legal.
HTML DOM Document createTextNode() Method
The createTextNode() method is used for creating a text node. All HTML elements, attributes, and texts are basically nodes.
HTML DOM Document defaultView Property
The defaultView property is used to return the document window object.
HTML DOM Document designMode Property
The designMode property is used to either set or return if the document is editable.
HTML DOM Document doctype Property
The doctype property is used to return a document doctype in the DocumentType object. It is a read-only property and it returns null if the doctype property is missing.
HTML DOM Document documentElement Property
The documentElement property is used to return the document element. Its returned object is html element and is read-only property.
HTML DOM Document documentURI property
The documentURI property is used to either set or return the document location. If the document is created in memory then it will return null. It can be used with any document type.
HTML DOM Document domain Property
The domain property is used to return the name of the domain of the server from where the document is loaded. If the document is created in memory then it will return null.
HTML DOM Document embeds Property
The embeds property is used to return a collection of all embed elements in the document and it is read-only property.
HTML DOM Document forms Property
The forms property is used to return the collection of all form elements in a document. It is a read-only property and returns HTMLCollection.
HTML DOM Document getElementById() Method
The getElementById() method is used to return an element with a specified id. It returns null if the element does not exist.
HTML DOM Document getElementsByClassName() Method
The getElementsByClassName() method is used to return collection of elements with a specific class. It is read-only property and returns HTMLCollection.
HTML DOM Document getElementsByName() Method
The getElementsByName() method is used to return collection of elements with specific name. It returns is NodeList. The nodes in the list can be accessed by index and start at 0.
HTML DOM Document getElementsByTagName() Method
The getElementsByTagName() method is used to return collection of all elements with a specific tag name. It returns is HTMLCollection and is read-only property.
HTML DOM Document hasFocus() Property
The hasFocus() method is used to return true if the document has focus or any of its elements has focus. Otherwise, it will return false.
HTML DOM Document head Property
The head property is used to return the head element of the document. If no head element is specified then it will return empty and if more than one is specified then it will return only the first one.
HTML DOM Document images Property
The images property is used to return collection of all img elements in a given document. It is read-only property and returns HTMLCollection.
HTML DOM Document implementation Property
The implementation property is used to return the DOMimplementation object that handles the document.
HTML DOM Document importNode() Property
The importNode() method is used for importing a node from another document. By settings its 2nd parameter to true, we can also import its child. The imported node is just a copy.
HTML DOM Document lastModified Property
The lastModified property is used to return the date and time at which the document was last modified. it is a read-only property.
HTML DOM Document links Property
The links property is used to return collection of all links in the current document. It is a read-only property and returns HTMLCollection.
HTML DOM Document normalize() Property
The normalize() method is used for removing empty text nodes and joining adjacent text nodes.
HTML DOM Document open() Method
The open() method is used for opening the document for writing. Due to this, all existing documents will be cleared. It is not the same as window.open() which is used for opening a new widow.
HTML DOM Document querySelector() Method
The querySelector() method is used to return the first element that matches the CSS selector. For returning all matches, we have to use querySelectorAll(). It will throw an SYNTAX_ERR exception if selectors are invalid.
HTML DOM Document querySelectorAll() Method
The querySelectorAll() method is used to return all elements that match a CSS selector. It will return a NodeList. It will throw SYNTAX_ERR exception if selectors are invalid.
HTML DOM Document readyState Property
The readyState property is used to return the status of the current document. It is read-only property.
HTML DOM Document referrer Property
The referrer property is used to return URL of the document that loaded the current document. It is read-only property.
HTML DOM Document removeEventListener() Method
The removeEventListener() method is used for removing an event handler from a document.
HTML DOM Document scripts Property
The scripts property is used to return the collection of all script elements in the document. It is a read-only property and returns HTMLCollection.
HTML DOM Document title Property
The title property is used to either set or return the title of the document.
HTML DOM Document URL Property
The URL property is used to return the full URL of the document.
HTML DOM Document write() Method
The write() method is used to write directly to an HTML document stream. It will delete everything on the existing HTML when used together with loaded document.
HTML DOM Document writeln() Property
The writeln() method is used to write directly to an HTML document stream. However, it will add a newline character after each statement.
DOM HTMLCollection Properties and Methods
HTMLCollection length Property
The length property is used to return number of elements in HTMLCollection. It is read-only property and useful when we want to loop through an HTMLCollection.
HTMLCollection item() Method
The item() method is used to return elements at a specific index in HTMLCollection. Elements in it can be accessed by their index numbers that start at 0.
HTMLCollection namedItem() Method
The namedItem() method is used to return named element from HTMLCollection. For this purpose, it uses id or name attribute to identify elements.
HTML DOM Attributes Properties and Methods
HTML DOM Attributes getNamedItem() Method
The getNamedItem() method is used to return an attribute node from a NamedNodeMap object.
HTML DOM Attributes item() Method
The item() method is used to return attributes by their index numbers from a NamedNodeMap. They are sorted according to their appearance in the source code which starts at 0.
HTML DOM Attributes length Property
The length property is used to return number of nodes in NamedNodeMap. It is read-only property.
HTML DOM Attributes removeNamedItem() Method
The removeNamedItem() method is used for removing nodes in a NamedNodeMap by using its name.
HTML DOM Attributes setNamedItem() Method
The setNamedItem() method is used for adding an attribute node to a NamedNodeMap. If the new attribute node already presents the it will replaced the old one and the old one is returned else return is null.
HTML DOM Attribute name Property
The name property is used to return the name of the attribute and is a read-only property.
HTML DOM Attribute value Property
The value property is used to either set or get the value of an attribute.
HTML DOM Attribute specified Property
The specified property is used to return true if an attribute is specified else it will return an error.
HTML DOM Elements Properties and Methods
HTML DOM Element accessKey Property
The accessKey property is used to either set or get the accesskey attribute of an element. It is actually used to specify a shortcut key to activate or focus an element.
HTML DOM Element addEventListener() Method
The addEventListener() method is used for attaching an event handler to an element.
HTML DOM Element appendChild() Method
The appendChild() method is used to append node i.e, element as the last child of an element.
HTML DOM Element attributes Property
The attributes property is used to return collection of attributes in an element in the form of NamedNodeMap. It is an array-like unordered collection of element attributes.
HTML DOM Element blur() Method
The blur() method is used for removing focus from an element.
HTML DOM Element childElementCount Property
The childElementCount property is used to return number of child elements of an element and is a read-only property. It is similar to children.length.
HTML DOM Element childNodes Property
The childNodes property is used to return the collection of an element child nodes. It is read-only property and returns a NodeList object.
HTML DOM Element children Property
The children property is used to return the collection of element child elements. It will return HTMLCollection object.
HTML DOM Element classList Property
The classList property is used to return the CSS classnames of an element and it will return DOMTokenList.
HTML DOM Element className Property
The className property is used to either get or set an element class attribute.
HTML DOM Element click() Method
The click() method is used to simulate a mouse-click on an element. It is the same as a user manually clicks on an element.
HTML DOM Element clientHeight Property
The clientHeight is read-only property and it is used to return the viewable height of an element in pixels that includes padding, scrollbar or margin but it does not include the border.
HTML DOM Element clientLeft Property
The clientLeft property is a read-only property and it returns the width of the element left border in pixels. It does not include left padding or left margin.
HTML DOM Element clientTop Property
The clientTop property is a read-only property and it returns the width of the element top border in pixels. It does not include top padding or top margin.
HTML DOM Element clientWidth Property
The clientWidth is read-only property and it is used to return the viewable width of an element in pixels that includes padding, scrollbar or margin but it does not include the border.
HTML DOM Element cloneNode() Method
The cloneNode() method is used for creating copies of a node and returning it. It clones all of its attributes and values. By setting its deep parameter to true, it will clone its children.
HTML DOM Element closest() Method
The closest() method is used to search up DOM tree for element that matches specific CSS selector. It starts at itself and then parent, grandparent, and so on
HTML DOM Element compareDocumentPosition() Method
The compareDocumentPosition() method is used for comparing two nodes. It returns an integer to describe their position in the document.
HTML DOM Element contains() Method
The contains() method is used to return true if a node is a descendant of a node else it will return false. The child, grandchild, great-grandchild, and so on are descendants.
HTML DOM Element contentEditable Property
The contentEditable property is used to either set or return if the content of an element is editable or not.
HTML DOM Element dir Property
The dir property is used to either set or return an element dir attribute. This attribute is basically used for text-direction.
HTML DOM Element firstChild Property
The firstChild property is used to return first child node of a node. It is a read-only property and returns a node object. It is similar to childNodes[0].
HTML DOM Element firstElementChild Property
The firstElementChild property is used to return the first child element of the specified element and is read-only property. It is the same as children[0].
HTML DOM Element focus() Method
The focus() method is used for focusing on the element if that element can be focused.
HTML DOM Element getAttribute() Method
The getAttribute() method is used to return the value of an element attribute.
HTML DOM Element getAttributeNode() Method
The getAttributeNode() method is used to return Attribute object. For accessing the attribute value, we have to Attr value property.
HTML DOM Element getBoundingClientRect() Method
The getBoundingClientRect() method is used to return DOMRect object. In other words, it returns the size of an element and its position relative to the viewport.
HTML DOM Element getElementsByClassName() Method
The getElementsByClassName() method is used to return collection of child elements with a given class name. Its return is a NodeList object.
HTML DOM Element getElementsByTagName() Method
The getElementsByTagName() method is used to return collection of child elements with a given tag name. Its return is a NodeList object.
HTML DOM Element hasAttribute() Method
The hasAttribute() method is used to return true if the attribute exists. If it does not exist then it will return false.
HTML DOM Element hasAttributes() Method
The hasAttributes() method is used to return true if a node has attributes else false. It is only applicable on the element node and will return false if it is not the element node.
HTML DOM Element hasChildNodes() Method
The hasChildNodes() is a read-only method and it returns true if the specified node has any child nodes else false. Whitespaces are considered text nodes.
HTML DOM Element id Property
The id property is used to either set or return the value of an element id attribute. It must be unique within the page
HTML DOM Element innerHTML Property
The innerHTML property is used to either set or return the HTML content of an element.
HTML DOM Element innerText Property
The innerText property is used to either set or return the text content of an element. When setting, it will erase all previous nodes and add a new node.
HTML DOM Element insertAdjacentElement() Method
The insertAdjacentElement() method is used for inserting an element into a specified position.
HTML DOM Element insertAdjacentHTML() Method
The insertAdjacentHTML() method is used for inserting HTML code into a specified position.
HTML DOM Element insertAdjacentText() Method
The insertAdjacentText() method is used for inserting text into a specified position.
HTML DOM Element insertBefore() Method
The insertBefore() method is used for inserting a child node before an existing child.
HTML DOM Element isContentEditable Property
The isContentEditable is a read-only property and it returns true if the content of an element is editable.
HTML DOM Element isDefaultNamespace() Method
The isDefaultNamespace() method is used to return true if the elements namespace is default else it will return false.
HTML DOM Element isEqualNode() Method
The isEqualNode() is used to return true if two elements are equal or two nodes are equal.
HTML DOM isSameNode() Method
The isSameNode() method is used to check if two nodes are the same node. If they are the same it will return true else false.
HTML DOM Element lang Property
The lang property is used to either set or return the value of the element lang attribute.
HTML DOM Element lastChild Property
The lastChild property is used to return the last child node of a node. It is a read-only property and returns a node object.
HTML DOM lastElementChild Property
The lastElementChild property is used to return the last child element of the specified element and is read-only property.
HTML DOM Element matches() Method
The matches() method is used to return true if an element matched a specific CSS selector. It will return false otherwise.
HTML DOM Element namespaceURI Property
The namespaceURI property is a read-only property and is used to return the URI of the namespace of an element.
HTML DOM Element nextSibling Property
The nextSibling property is a read-only property and it returns the next node on the same tree level. It actually returns the node object.
HTML DOM Element nextElementSibling Property
The nextElementSibling property is a read-only property and it returns the next element in the same tree level.
HTML DOM Element nodeName Property
The nodeName property is a read-only property and it returns the name of a node.
HTML DOM Element nodeType Property
The nodeType property is a read-only property and it returns the node type of the specified node in the form of the number.
HTML DOM nodeValue Property
The nodeValue property is used to either set or return the value of a node. For element node, it will return NULL.
HTML DOM Element normalize() Method
The normalize() method is used for removing empty text nodes and joining adjacent text nodes.
HTML DOM Element offsetHeight Property
The offsetHeight property is a read-only property and it returns the viewable height of an element that includes padding, border, and scrollbar in pixels but it does not include the margin.
HTML DOM Element offsetWidth Property
The offsetWidth property is a read-only property and it returns the viewable width of an element that includes padding, border, and scrollbar in pixels but it does not include the margin.
HTML DOM Element offsetLeft Property
The offsetLeft property is a read-only property and it returns the left position relative to the parent in pixels.
HTML DOM Element offsetParent Property
The offsetParent property is used to return the nearest ancestor which has a non-static position i.e, other than static. It will return null if the element is invisible.
HTML DOM Element offsetTop Property
The offsetTop property is a read-only property and it returns the top position relative to the parent in pixels.
HTML DOM Element outerHTML Property
The outerHTML property is used to either set or return the HTML element that includes attributes, start tag, and end tag.
HTML DOM outerText Property
The outerText property is used to either set or return the text content of the specified node. It is very much similar to the outerHTML.
HTML DOM ownerDocument Property
The ownerDocument property is used to return the owner document of a node. It will return it as a Document object.
HTML DOM Element parentNode Property
The parentNode property is read-only property and it return the parent node of an element or node.
HTML DOM Element parentNode Property
The parentNode property is read-only property and it return the parent node of an element or node.
HTML DOM parentElement Property
The parentElement property is used to return the parent element of the specified element. It is similar to parentNode property.
HTML DOM Element previousSibling Property
The previousSibling property is a read-only property and it returns the previuos node on the same tree level. It actually returns the node object.
HTML DOM Element previousElementSibling Property
The previousElementSibling property is a read-only property and it returns the previous element in the same tree level.
HTML DOM querySelector() Method
The querySelector() method is used to return first child element that matched specified CSS selectors of an element.
HTML DOM querySelectorAll() Method
The querySelectorAll() method is used to return collection of an element child elements that matched specified CSS selector.
HTML DOM Element remove() Method
The remove() method is used to remove an element or node from the document.
HTML DOM Element removeAttribute() Method
The removeAttribute() method is used for removing an attribute from an element. It is similar to removeAttributeNode().
HTML DOM Element removeAttributeNode() Method
The removeAttributeNode() method is used for removing an attribute from an element. It is similar to removeAttribute().
HTML DOM Element removeChild() Method
The removeChild() method is used for removing an element child. It is actually removed from DOM(Document Object Model).
HTML DOM Element removeEventListener() Method
The removeEventListener() method is used for removing an event handler from an element.
HTML DOM Element replaceChild() Method
The replaceChild() method is used for replacing. It is used to replace child node with a new node.
HTML DOM Element scrollHeight Property
The scrollHeight property is a read-only property and it returns the height of an element including padding.
HTML DOM Element scrollIntoView Property
The scrollIntoView() method is used for scrolling an element into the visible area of the browser window.
HTML DOM Element scrollLeft Property
The scrollLeft property is used to either set or return the number of pixels an element content is scrolled horizontally.
HTML DOM Element scrollTop Property
The scrollTop property is used to either set or return the number of pixels an element content is scrolled vertically.
HTML DOM Element scrollWidth Property
The scrollWidth property is a read-only property and it returns the width of an element including padding.
HTML DOM Element setAttribute() Method
The setAttribute() method is used to set a new value to an attribute. It will create attribute if it does not exist.
HTML DOM Element setAttributeNode() Method
The setAttributeNode() method is used to add an attribute node to an element and if that attribute is already present it will replace it.
HTML DOM Element style Property
The style property is used to return the value of an element style attribute. It actually return a CSSStyleDeclaration object.
HTML DOM Element tabIndex Property
The tabIndex property is used to either set or return the value of the tabindex attribute of an element. This property is used to specify the order of element when navigating.
HTML DOM Element tagName Property
The tagName property is a read-only property and it return the tag name of an element. The property name will be returned in UPPERCASE.
HTML DOM Element textContent Property
The textContent property is used to either set or return the text content of the specified node. It will also return the text content of all of its descendants.
HTML DOM Element title Property
The title property is used to either set or return the value of an element title attribute. It is basically used for giving extra information about an element.
HTML DOM Style Object Properties
Style backgroundRepeat Property
The backgroundRepeat property is used to either set or return how to repeat a background image.
Style backgroundClip Property
The backgroundClip property is used to either set or return the painting area of the background.
Style backgroundOrigin Property
The backgroundOrigin property is used to either set or return what the background-position property is relative to. If background-attachment is set to fixed then this property will not work.
Style backgroundSize Property
The backgroundSize property is used to either set or return the size of the background images.
Style backfaceVisibility Property
The backfaceVisibility property is used to specify whether an element should be visible when not facing the screen or not.
Style border Property
The border property is used to either set or return up to three separate border properties. It is a shorthand property.
Style borderBottom Property
The borderBottom property is used to either set or return up to three separate border-bottom properties. It is a shorthand property.
Style borderBottomColor Property
The borderBottomColor property is used to either set or return color of the bottom border of an element.
Style borderBottomLeftRadius Property
The borderBottomLeftRadius property is used to either set or return the shape of the border of the bottom-left corner.
Style borderBottomRightRadius Property
The borderBottomRightRadius property is used to either set or return the shape of the border of the bottom-right corner.
Style borderBottomStyle Property
The borderBottomStyle property is used to either set or return the style of the bottom border of an element.
Style borderBottomWidth Property
The borderBottomWidth property is used to either set or return the width of the bottom border of an element.
Style borderCollapse Property
The borderCollapse property is used to either set or return whether the table border should be collapsed into a single border or not.
Style borderColor Property
The borderColor property is used to either set or return the color of an element border.
Style borderImage Property
The borderImage property is used for setting images on the border. It is a shorthand property of borderImageSource, borderImageSlice, borderImageWidth, borderImageOutset, and borderImageRepeat.
Style borderImageOutset Property
The borderImageOutset property is used to either set or return the amount by which the border-image area extends beyond the border-box.
Style borderImageRepeat Property
The borderImageRepeat property is used to either set or return whether the image border should be rounded, repeated, or stretched.
Style borderImageSlice Property
The borderImageSlice property is used to specify the inward offsets of the image border.
Style borderImageSource Property
The borderImageSource property is used to either set or return the image to be used. It is used instead of the border styles given by the border-style properties.
Style borderImageWidth Property
The borderImageWidth property is used to specify the widths of the image border.
Style borderLeft Property
The borderLeft property is used to either set or return up to three separate border-left properties. It is a shorthand property.
Style borderLeftColor Property
The borderLeftColor property is used to either set or return the color of the left border of an element.
Style borderLeftStyle Property
The borderLeftStyle property is used to either set or return the style of the left border of an element.
Style borderLeftWidth Property
The borderLeftWidth property is used to either set or return the width of the left border of an element.
Style borderRadius Property
The borderRadius property is a shorthand property. It is used to set or return four borderRadius properties.
Style borderRight Property
The borderRight property is used to either set or return up to three separate border-right properties. These are border-right-width, border-right-style, and border-right-color.
Style borderRightColor Property
The borderRightColor property is used to either set or return the color of the right border of an element.
Style borderRightStyle Property
The borderRightStyle property is used to either set or return the style of the right border of an element.
Style borderRightWidth Property
The borderRightWidth property is used to either set or return the width of the right border of an element.
Style borderSpacing Property
The borderSpacing property is used to either set or return the space between cells in a table. It will not work if borders are collapsable.
Style borderStyle Property
The borderStyle property is used to either set or return the style of an element border.
Style borderTop Property
The borderTop property is used to either set or return up to three separate border-top properties. It is a shorthand property.
Style borderTopColor Property
The borderTopColor property is used to either set or return the color of the top border of an element.
Style borderTopLeftRadius Property
The borderTopLeftRadius property is used to either set or return the shape of the border of the top-left corner. It helps us to add rounded borders to elements.
Style borderTopRightRadius Property
The borderTopRightRadius property is used to either set or return the shape of the border of the top-right corner. It helps us to add rounded borders to elements.
Style borderTopStyle Property
The borderTopStyle property is used to either set or return the style of the top border of an element.
Style borderTopWidth Property
The borderTopWidth property is used to either set or return the width of the top border of an element.
Style borderWidth Property
The borderWidth property is used to either set or return the width of an element border.
Style bottom Property
The bottom property is used to either set or return the bottom position of a positioned element.
Style boxShadow Property
The boxShadow property is used to either set or return the drop-shadows of a box element.
Style boxSizing Property
The boxSizing property is used to define how certain elements fit in an area in a certain way like we want two boxes to place side by side.
Style captionSide Property
The captionSide property is used to either set or return the position of the table caption.
Style caretColor Property
The caretColor property is used to specify color of the cursor in textareas, inputs, or any element that is editable. The cursor is actually caret.
Style clear Property
The clear property is used to either set or return the position of the element relative to floating objects.
Style clip Property
The clip property is used to either set or return which part of a positioned element is visible.
Style color Property
The color property is used to either set or return the color of the text.
Style columnCount Property
The columnCount property is used to specify number of columns an element should be divided into.
Style columnFill Property
The columnFill property is used to specify how to fill columns. We can set it to balanced or not.
Style columnGap Property
The columnGap property is used to specify the gap between the columns. If column-rule property is present between columns, then it will appear in the middle of the gap.
Style columnRule Property
The columnRule property is a shorthand property. It is used for setting the width, style, and color of the given element.
Style columnRuleColor Property
The columnRuleColor property is used to specify the color of the rule between columns.
Style columnRuleStyle Property
The columnRuleStyle property is used to specify the style of the rule between columns.
Style columnRuleWidth Property
The columnRuleWidth property is used to specify width of the rule between columns.
Style columns Property
The columns property is a shorthand property. Two properties included in it are columnWidth, columnCount.
Style columnSpan Property
The columnSpan property is used to specify how many columns an element should span across.
Style columnWidth Property
The columnWidth property is used to specify the width of the columns.
Style counterIncrement Property
The counterIncrement property is used for incrementing one or more counter values. It is used in combination with counterReset property and the content property.
Style counterReset Property
The counterReset property is used to create or reset one or more counters. It is used in combination with counterIncrement property and the content property.
Style cursor Property
The cursor property is used to set or return the type of cursor to display for the mouse pointer.
Style direction Property
The direction property is used to either set or return the text direction of element content. In other words, it is a reading order.
Style display Property
The display property is used to either set or return element display type. Mostly used property values are inline and block.
Style emptyCells Property
The emptyCells property is used to either set or return whether or not to show the border and background of empty cells.
Style filter Property
The filter property is used to add visual effects to images. It includes saturation, blur, and similar effects.
Style flex Property
The flex property is used to either set or return the length of the item. It is relative to the rest of the flexible items inside the same container.
Style flexBasis Property
The flexBasis property is used to specify initial length of a flexible item. It will only work if items are flexible.
Style flexDirection Property
The flexDirection property is used to either set or return the direction of the flexible items. It will only work if items are flexible.
Style flexFlow Property
The flexFlow property is a shorthand property. It is used to specify the direction of flexible items and also determine whether or not the element is wrapped.
Style flexGrow Property
The flexGrow property is used to specify how much the item will grow relative to the rest of the flexible items inside the same container. It will only work if items are flexible.
Style flexShrink Property
The flexShrink property is used to specify how items will shrink relative to the rest of the flexible items inside the same container. It will only work if items are flexible.
Style flexWrap Property
The flex-wrap property is used to specify whether the flexible items should wrap or not. It is only usable if items are flexible. Its default value is nowrap.
Style cssFloat Property
The cssFloat property is used to either set or return the horizontal alignment of an element.
Style font Property
The font property is used to either set or return the font property of an element. It is a shorthand property for font-style, font-variant, font-weight, font-size, line-height, font-family.
Style fontFamily Property
The font-family property is used to set or return the font-family property of an element. It can hold several font names as a fallback system.
Style fontSize Property
The fontSize property is used to either set or return the font size of the text.
Style fontStyle Property
The fontStyle property is used to either set or return the style of the font. The style may be normal, italic, or oblique.
Style fontVariant Property
The fontVariant property is used to either set or return whether or not the font should be displayed in small capital letters.
Style fontWeight Property
The fontWeight property is used to either set or returns how thin or thick characters in a text should be displayed.
Style fontSizeAdjust Property
The fontSizeAdjust property is used to either set or return the font aspect value of a text. It is basically the size difference between the lowercase letter and the uppercase letter.
Style height Property
The height property is used to either set or return the height of an element. It is applicable to elements that have fixed or absolute positions or are block-level elements.
Style isolation Property
The isolation property is used to specify whether or not an element creates a new stacking content.
Style justifyContent Property
The justifyContent property is used to align flexible items horizontally i.e, on the main axis.
Style left Property
The left property is used to either set or return the left position of a positioned element.
Style letterSpacing Property
The letterSpacing property is used to either set or return space between characters in a text.
Style lineHeight Property
The lineHeight property is used to either set or return the distance between lines in a text.
Style listStyle Property
The listStyle property is used to either set or return up to three separate list properties. It is basically a shorthand property.
Style listStyleImage Property
The listStyleImage property is used to either set or return the image as the list-item marker.
Style listStylePosition Property
The listStylePosition property is used to set or return the position of the list-item marker.
Style listStyleType Property
The listStyleType property is used to either set or return the list-item marker type.
Style margin Property
The margin property is used to either set or return the margin of an element border.
Style marginBottom Property
The marginBottom property is used to either set or return the bottom margin of an element.
Style marginLeft Property
The marginLeft property is used to either set or return the left margin of an element.
Style marginRight Property
The marginRight property is used to either set or return the right margin of an element.
Style marginTop Property
The marginTop property is used to either set or return the top margin of an element.
Style maxHeight Property
The maxHeight property is used to either set or return the maximum height of an element.
Style maxWidth Property
The maxWidth property is used to either set or return the maximum width of an element.
Style minHeight Property
The minHeight property is used to either set or return the minimum height of an element.
Style minWidth Property
The minWidth property is used to either set or return the minimum width of an element.
Style objectFit Property
The objectFit property is used to define how we can adjust and resize the img or video element to fit into the container.
Style objectPosition Property
The objectPosition property is used to define how an img or video element be positioned in its own content box.
Style opacity Property
The opacity property is used to either set or return the opacity level of an element.
Style order Property
The order property is used to define the order of a flexible item relative to the rest of the flexible items.
Style orphans Property
The orphans property is used to either set or return the minimum number of lines for an element that must be visible at the bottom of a page.
Style outline Property
The outline property is used to either set or return all the outline properties. An outline is a line around an element and is displayed around the margin of the element.
Style outlineColor Property
The outlineColor property is used to either set or return the color of the outline around an element.
Style outlineOffset Property
The outlineOffset property is used for specifying the offsets of an outline and drawing it beyond the border edge.
Style outlineStyle Property
The outlineStyle property is used to either set or return the style of the outline around an element.
Style outlineWidth Property
The outlineWidth property is used to either set or return the width of the outline around an element.
Style overflow Property
The overflow property is used to either set or return what to do with content that renders outside the element box.
Style overflowX Property
The overflowX property is used to define what to do with the right or left edge of the content in case it overflows the element content area.
Style overflowY Property
The overflowY property is used to define what to do with the top or bottom edge of the content in case it overflows the element content area.
Style padding Property
The padding property is used to either set or return the padding of an element border.
Style paddingBottom Property
The paddingBottom property is used to either set or return the bottom padding of an element.
Style paddingLeft Property
The paddingLeft property is used to either set or return the left padding of an element.
Style paddingRight Property
The paddingRight property is used to either set or return the right padding of an element.
Style paddingTop Property
The paddingTop property is used to either set or return the top padding of an element.
Style pageBreakAfter Property
The pageBreakAfter property is used to either set or return the page-break behavior after an element.
Style pageBreakBefore Property
The pageBreakBefore property is used to either set or return the page-break behavior before an element.
Style pageBreakInside Property
The pageBreakInside property is used to either set or return the page-break behavior inside an element.
Style perspective Property
The perspective property is used for specifying how many pixels a 3D element is placed from the view.
Style perspectiveOrigin Property
The perspectiveOrigin property is used for defining where a 3D element is placed on the x-axis and y-axis.
Style position Property
The position property is used to either set or return the type of positioning method used for an element. Some methods are fixed, static, relative, absolute, sticky.
Style quotes Property
The quotes property is used to either set or return the type of quotation marks for embedded quotations.
Style resize Property
The resize property is used to define whether an element is resizable by the user or not.
Style right Property
The right property is used to either set or return the right position of a positioned element.
Style scrollBehavior Property
The scrollBehavior property is used to specify whether to smoothly animate the scroll position or a straight jump when the user clicks on a link within a scrollable box.
Style tableLayout Property
The tableLayout property is used to either set or return the way in which we can layout table cells, rows, and columns.
Style tabSize Property
The tabSize property is used to specify the length of the space used for the tab character. It is mostly displayed as a single space-character.
Style textAlign Property
The textAlign property is used to either set or return the horizontal alignment of text in a block-level element.
Style textAlignLast Property
The textAlignLast property is used to define how to align the last line of a text. It will only work if the text-align property is set to justify.
Style textDecoration Property
The textDecoration property is used to either set or return one or more decorations for a text.
Style textDecorationColor Property
The textDecorationColor property is used for defining the color of the text-decoration.
Style textDecorationLine Property
The textDecorationLine property is used to either set or return the type of line the decoration will have.
Style textDecorationStyle Property
The textDecorationStyle property is used to either set or return how the line will be displayed.
Style textIndent Property
The textIndent property is used to either set or return the indentation of the first line of text.
Style textOverflow Property
The textOverflow property is used to define what will happen once the text overflows the containing element.
Style textShadow Property
The textShadow property is used to either set or return one or more than one shadow effect for a text.
Style textTransform Property
The textTransform property is used to either set or return the capitalization of a text. It is used for converting text to uppercase or lowercase.
Style top Property
The top property is used to either set or return the top position of a positioned element.
Style transform Property
The transform property is used to apply a 2D or 3D transformation to an element. It allows us to scale, rotate, move, skew, translate, etc the elements.
Style transformOrigin Property
The transformOrigin property is used to change the position of transformed elements.
Style transformStyle Property
The transformStyle property is used to either set or return how nested elements are rendered in 3D space.
Style transition Property
The transition property is a shorthand property. It is the combination of the following four properties transitionProperty, transitionDuration, transitionTimingFunction, and transitionDelay.
Style transitionProperty Property
The transitionProperty property is used to define the name of the CSS property the transition effect is for i.e, the transition effect will start when the specified CSS property changes.
Style transitionDuration Property
The transitionDuration property is used to either set or returns how many milliseconds or seconds a transition effect takes to complete.
Style transitionTimingFunction Property
The transitionTimingFunction property is used to specify the speed curve of the transition effect.
Style transitionDelay Property
The transitionDelay property is used to define the delay after which the transition effect will start. It may be in seconds (s) or milliseconds (ms).
Style unicodeBidi Property
The unicodeBidi property is used to either set or return whether or not the text should be overridden to support multiple languages in the same document.
Style userSelect Property
The userSelect property is used to either set or return whether or not the text of an element can be selected.
Style verticalAlign Property
The verticalAlign property is used to either set or return vertical alignment of the content in an element.
Style visibility Property
The visibility property is used to either set or return whether an element should be visible.
Style whiteSpace Property
The whiteSpace property is used to either set or return how to handle line breaks, whitespaces, and tabs in a text.
Style width Property
The width property is used to either set or return the width of an element. It is applicable to elements that have fixed or absolute positions or are block-level elements.
Style wordBreak Property
The wordBreak property is used to define line-breaking rules for non-CJK scripts like Chinese, Japanese and Korean.
Style wordSpacing Property
The wordSpacing property is used to either set or return the spacing between words in a text.
Style wordWrap Property
The wordWrap property is used to break the long words in order to wrap them into the next line.
Style widows Property
The widows property is used to either set or return the minimum number of lines that must be present at top of an element.
Style zIndex Property
The zIndex property is used to either set or return the stack order of a positioned element.
Style alignContent Property
The alignContent property is used for aligning the flexible container items. It happens when the items do not use all available space vertically.
Style alignItems Property
The alignItems property is used to specify default alignment for items inside the flexible container. To override it, we have to use the align-self property.
Style alignSelf Property
The alignSelf property is used for specifying alignment for the selected item inside the flexible container. It will override the default alignItems property.
Style animation Property
The animation property is used for animating an element or component. It is a shorthand property for six animation properties.
Style animationDelay Property
The animationDelay property is used to specify when the animation will start. It is defined in milliseconds (ms) or seconds (s). We can use negative values in it.
Style animationDirection Property
The animationDirection property is used to either set or return whether the animation should play in reverse on alternate cycles or not.
Style animationDuration Property
The animationDuration property is used to define how many milliseconds or seconds an animation would take to complete one cycle.
Style animationFillMode Property
The animationFillMode property is used to specify what styles will apply for the element when the animation is not playing.
Style animationIterationCount Property
The animationIterationCount property is used to either set or return how many times an animation should be played.
Style animationName Property
The animationName property is used to either set or return the name for the @keyframes animation.
Style animationTimingFunction Property
The animationTimingFunction is used to specify the speed curve of the animation. It actually used to make smooth changes.
Style animationPlayState Property
The animationPlayState property is used to define whether the animation is running or paused. We can use it to stop animation in middle.
Style background Property
The background property is used to either set or returns up to eight separate background properties. It is a shorthand form of these eight properties.
Style backgroundAttachment Property
The backgroundAttachment property is used to either set or return whether a background image should scroll with the content or it should be fixed.
Style backgroundColor Property
The backgroundColor property is used to either set or return the background color of an element.
Style backgroundImage Property
The backgroundImage property is used to either set or return the background image of an element.
Style backgroundPosition Property
The backgroundPosition property is used to either set or return the position of a background image within an element.
HTML DOM AnimationEvent Properties and Methods
AnimationEvent animationName Property in JavaScript
The animationName property is used to return name of animation when an animation event occurs.
AnimationEvent elapsedTime Property in JavaScript
The elapsedTime property is used to return number of seconds an animation has been running when an animation event occurs.
animationend Event in JavaScript
The animationend event is used to occur when CSS animation has completed. Three events occur when a CSS animation plays.
animationiteration Event in JavaScript
The animationiteration event is used to occur when CSS animation is repeated.
animationstart Event in JavaScript
The animationstart event is used to occur when CSS animation has just started. Three events occur when a CSS animation plays.
HTML DOM ClipboardEvent Properties and Methods
oncopy Event in JavaScript
The oncopy event is used to occur when a user copies the content of an element. It is mostly used with text and inputs.
oncut Event in JavaScript
The oncut event is used to occur when a user cuts the content of an element. It is mostly used with text and inputs.
onpaste Event in JavaScript
The onpaste event is used to occur when a user pastes the content of an element into another element. It is mostly used with text and inputs.
HTML DOM DragEvent Properties and Methods
ondrag Event in JavaScript
The ondrag event fires when an element or text selection is being dragged. Links are draggable by default similar to images.
ondragend Event in JavaScript
The ondragend event fires when the user has finished dragging an element or text selection. Links are draggable by default similar to images.
ondragenter Event in JavaScript
The ondragenter event fires when a draggable element or text selection enters a valid drop target. Links are draggable by default similar to images.
ondragleave Event in JavaScript
The ondragleave event fires when a draggable element or text selection leaves a valid drop target. Links are draggable by default similar to images.
ondragover Event in JavaScript
The ondragover event fires when a draggable element or text selection is being dragged over a valid drop target. Links are draggable by default similar to images.
ondragstart Event in JavaScript
The ondragstart event fires when the user starts to drag an element or text selection. Links are draggable by default similar to images.
ondrop Event in JavaScript
The ondrop event fires when a draggable element or text selection is dropped on a valid drop target. Links are draggable by default similar to images.
HTML DOM FocusEvent Properties and Methods
FocusEvent relatedTarget Property
The relatedTarget property is a read-only property and it returns an element related to the element that triggered the focus or blur event.
onblur Event in JavaScript
The onblur event fires the moment that the element loses focus. Onblur is most often used with form validation code.
onfocus Event in JavaScript
The onfocus attribute fires the moment that the element gets focused. It is mostly used on input and select elements.
onfocusin Event in JavaScript
The onfocusin event is used to occur when an element is about to get focused. It is similar to onfocus event.
onfocusout Event in JavaScript
The onfocusout event is used to occur when an element is about to lose focus. It is similar to onblur event.
HTML DOM HashChangeEvent Properties and Methods
HashChangeEvent newURL Property in JavaScript
The newURL property is a read-only property and is used to return URL of the document when hash i.e, anchor part has been changed.
HashChangeEvent oldURL Property in JavaScript
The oldURL property is a read-only property and is used to return URL of the document before hash i.e, anchor part has been changed.
onhashchange Event in JavaScript
The onhashchange event fires when there have been changes to the anchor part of the current URL.
HTML DOM InputEvent Properties and Methods
InputEvent data Property in JavaScript
The data property is a read-only property and it returns the character that was inserted with the event.
InputEvent inputType Property in JavaScript
The inputType property is used for returning type of change that was done by event.
oninput Event in JavaScript
The oninput event fires when an element gets user input. It also fires when the value of an input or textarea element is changed.
HTML DOM KeyboardEvent Properties and Methods
onkeydown Event in JavaScript
The onkeydown event fires when the user is pressing a key. It can be used with all HTML elements.
onkeypress Event in JavaScript
The onkeypress attribute fires when the user presses a key. It can be used with all HTML elements.
onkeyup Event in JavaScript
The onkeyup attribute fires when the user releases a key. It can be used with all HTML elements.
KeyboardEvent altKey Property in JavaScript
The altKey property is a read-only property and it is used to return a Boolean value that indicates whether the ALT key was pressed when a key event was triggered or not.
KeyboardEvent charCode Property in JavaScript
The charCode property is a read-only property and it is used to return Unicode character code of the key that triggered the onkeypress event.
KeyboardEvent code Property in JavaScript
The code property is used to return the key that triggered the event. However, it may return different values for different keyboard layouts.
KeyboardEvent ctrlKey Property in JavaScript
The ctrlKey property is a read-only property and it is used to return a Boolean value that indicates whether the CTRL key was pressed when a key event was triggered or not.
KeyboardEvent getModifierState() Method in JavaScript
The getModifierState() method is used to return true if the specified modifier key was pressed or activated else it will return false.
KeyboardEvent key Property in JavaScript
The key property is a read-only property and it is used to return the identifier of the key that was pressed when a key event occurred.
KeyboardEvent keyCode Property in JavaScript
The keyCode property is a read-only property and it is used to return Unicode character code of the key that triggered the onkeypress event.
KeyboardEvent location Property in JavaScript
The location property is a read-only property and it is used to return a number that indicates the location of a key on the keyboard or device.
KeyboardEvent metaKey Property in JavaScript
The metaKey property is a read-only property and it is used to return a Boolean value that indicates whether the META key was pressed when a key event was triggered or not.
KeyboardEvent shiftKey Property in JavaScript
The shiftKey property is a read-only property and it is used to return a Boolean value that indicates whether the SHIFT key was pressed when a key event was triggered or not.
HTML DOM MouseEvent Properties and Methods
onclick Event in JavaScript
The onclick event is used to fire on a mouse click on the element. It is applicable to all HTML elements.
oncontextmenu Event in JavaScript
The oncontextmenu event is used to fire when the user right-clicks on an element to open the context menu.
ondblclick Event in JavaScript
The ondblclick event is used to fire on a mouse double-click on the element.
onmousedown Event in JavaScript
The onmousedown event is used to fire when a mouse button is pressed down on the element. It is applicable to all HTML elements.
onmouseenter Event in JavaScript
The onmouseenter event is used to occur when the mouse pointer is moved onto an element. It is used in combination with the onmouseleave event.
onmouseleave Event in JavaScript
The onmouseleave event is used to occur when the mouse pointer is moved out of an element. It is used in combination with the onmouseenter event.
onmousemove Event in JavaScript
The onmousemove event is used to fire when the pointer is moving while it is over an element. It is applicable to all HTML elements.
onmouseout Event in JavaScript
The onmouseout event is used to fire when the mouse pointer moves out of an element. It is applicable to all HTML elements.
onmouseover Event in JavaScript
The onmouseover event is used to fire when the mouse pointer moves over an element. It is mostly used with onmouseout event.
onmouseup Event in JavaScript
The onmouseup event is used to fire when a mouse button is released over the element. It is applicable to all HTML elements.
MouseEvent altKey Property in JavaScript
The altKey property is a read-only property and it is used to return a Boolean value that indicates whether the ALT key was pressed when a mouse event was triggered or not.
MouseEvent button Property in JavaScript
The button property is a read-only property and it is used to return a number that indicates which mouse button was pressed when a mouse event was triggered.
MouseEvent buttons Property in JavaScript
The buttons property is a read-only property and it is used to return a number that indicates which mouse button or mouse buttons were pressed when a mouse event was triggered.
MouseEvent clientX Property in JavaScript
The clientX property is a read-only property and it is used to return horizontal coordinate of the mouse pointer when a mouse event was triggered according to client area.
MouseEvent clientY Property in JavaScript
The clientY property is a read-only property and it is used to return vertical coordinate of the mouse pointer when a mouse event was triggered according to client area.
MouseEvent ctrlKey Property in JavaScript
The ctrlKey property is a read-only property and it is used to return a Boolean value that indicates whether the CTRL key was pressed when a mouse event was triggered or not.
MouseEvent getModifierState() Method in JavaScript
The getModifierState() method returns true if the specified modifier key was pressed on mouse event, or activated else it will return false.
MouseEvent metaKey Property in JavaScript
The metaKey property is a read-only property and it is used to return a Boolean value that indicates whether the META key was pressed when a mouse event was triggered or not.
MouseEvent offsetX Property in JavaScript
The offsetX property is a read-only property and it is used to return x-coordinate of the mouse pointer relative to the target element.
MouseEvent offsetY Property in JavaScript
The offsetY property is a read-only property and it is used to return y-coordinate of the mouse pointer relative to the target element.
MouseEvent pageX Property in JavaScript
The pageX property is a read-only property and it is used to return horizontal coordinate of mouse pointer when a mouse event was triggered.
MouseEvent pageY Property in JavaScript
The pageY property is a read-only property and it is used to return vertical coordinate of mouse pointer when a mouse event was triggered.
MouseEvent relatedTarget Property in JavaScript
The relatedTarget property is a read-only property that returns an element related to the element that triggered the mouse event.
MouseEvent screenX Property in JavaScript
The screenX property is a read-only property and it is used to return horizontal coordinate of mouse pointer when an event was triggered according to users computer screen.
MouseEvent screenY Property in JavaScript
The screenY property is a read-only property and it is used to return vertical coordinate of mouse pointer when an event was triggered according to users computer screen.
MouseEvent shiftKey Property in JavaScript
The shiftKey property is a read-only property and it is used to return a Boolean value that indicates whether the SHIFT key was pressed when a mouse event was triggered or not.
HTML DOM PageTransitionEvent Properties and Methods
PageTransitionEvent persisted Property in JavaScript
The persisted property is a read-only property that returns a Boolean value that indicates if webpage is loaded directly from server or is cached when an onpageshow or onpagehide event occurs.
onpagehide Event in JavaScript
The onpagehide event is used to occur when user is navigating away from webpage.
onpageshow Event in JavaScript
The onpageshow event is used to occur when a user navigates to a webpage. It is like onload event.
HTML DOM ProgressEvent Properties and Methods
onerror Event in JavaScript
The onerror event is used to occur when an error occurs while loading an external file. Examples include loading a document or an image.
onloadstart Event in JavaScript
The onloadstart event is used to triggered when browser starts looking for specific audio or video.
HTML DOM StorageEvent Properties and Methods
StorageEvent storage Event in JavaScript
The storage event is used to only fire when a window other than itself makes the changes.
StorageEvent key Property in JavaScript
The key property is used to return name of changed storage item.
StorageEvent newValue Property in JavaScript
The newValue property is used to return the new value of changed storage item.
StorageEvent oldValue Property in JavaScript
The oldValue property is used to return the old value of changed storage item.
StorageEvent storageArea Property in JavaScript
The storageArea property is used to return Storage Object of the changed storage item.
StorageEvent url Property in JavaScript
The url property will only return url of page where storage item is changed.
HTML DOM TransitionEvent Properties and Methods
transitionend Event in JavaScript
The transitionend event is used to trigger when CSS transition has completed.
TransitionEvent propertyName Property in JavaScript
The propertyName property is a read-only property and it is used to return name of CSS property associated with the transition when a transition event occurs.
TransitionEvent elapsedTime Property in JavaScript
The elapsedTime property is a read-only property and it is used to return number of seconds a transition has been running when a transitionend event occurs.
HTML DOM WheelEvent Properties and Methods
onwheel Event in JavaScript
The onwheel event is used to trigger when mouse wheel is rolled up or down over an element.
WheelEvent deltaX Property in JavaScript
The deltaX property is a read-only property and it is used to return positive value when scrolling to right, and a negative value when scrolling to the left else 0.
WheelEvent deltaY Property in JavaScript
The deltaY property is a read-only property and it is used to return positive value when scrolling down, and a negative value when scrolling up else 0.
WheelEvent deltaZ Property in JavaScript
The deltaZ property is a read-only property and it is used to return a positive value when scrolling in and a negative value when scrolling out else 0.
WheelEvent deltaMode Property in JavaScript
The deltaMode property is a read-only property. It is used to return number representing length unit of scrolling values (deltaX, deltaY, and deltaZ).
HTML DOM UiEvent Properties and Methods
UiEvent detail Property in JavaScript
The detail property is a read-only property. It is used to return number with details about event.
view Event Property in JavaScript
The view event property is used to return reference to Window object where event occured.
onabort Event in JavaScript
The onabort event occurs when the media data download has been aborted, and not because of an error.
onbeforeunload Event in JavaScript
The onbeforeunload event fires when the document is about to be unloaded.
onload Event in JavaScript
The onload event is used with a body tag to execute the script once a page is loaded with all of its content.
onresize Event in JavaScript
The onresize event is used to trigger when the browser window is resized. It is mostly used only on the body element.
onscroll Event in JavaScript
The onscroll event is used to trigger when an element scrollbar is being scrolled. It can be applied to all HTML Elements.
onselect Event in JavaScript
The onselect event is used to trigger when after some text have been selected in an element.
onunload Event in JavaScript
The onunload event is used to trigger when once a page has unloaded. In other words, the browser window is closed.
HTML DOM TouchEvent Properties and Methods
TouchEvent altKey Property in JavaScript
The altKey property is a read-only property and it is used to return a Boolean value that indicates whether the ALT key was pressed when a touch event was triggered or not.
TouchEvent ctrlKey Property in JavaScript
The ctrlKey property is a read-only property and it is used to return a Boolean value that indicates whether the CTRL key was pressed when a touch event was triggered or not.
TouchEvent metaKey Property in JavaScript
The metaKey property is a read-only property and it is used to return a Boolean value that indicates whether the META key was pressed when a touch event was triggered or not.
TouchEvent shiftKey Property in JavaScript
The shiftKey property is a read-only property and it is used to return a Boolean value that indicates whether the SHIFT key was pressed when a touch event was triggered or not.
TouchEvent targetTouches Property in JavaScript
The targetTouches property is a read-only property and it is used to return an array of Touch objects.
TouchEvent touches Property in JavaScript
The touches property is a read-only property and it is used to return an array of Touch objects.
touchcancel Event in JavaScript
The touchcancel event is used to trigger when touch event gets interrupted. It is used for cleaning up code.
touchend Event in JavaScript
The touchend event is used to trigger when user removes the finger from an element.
touchmove Event in JavaScript
The touchmove event is used to trigger when user moves the finger across the screen.
touchstart Event in JavaScript
The touchstart event is used to trigger when the user touches an element.
The Event Object Properties and Methods
bubbles Event Property in JavaScript
The bubbles event property is used to return Boolean value that indicates whether an event is a bubbling event or not.
cancelBubble() Event Property in JavaScript
The cancelBubble() method is used to prevent event-flow from bubbling up to parent elements.
cancelable Event Property in JavaScript
The cancelable event property is used to return Boolean values indicating whether an event is a cancelable event or not.
HTM DOM Document createEvent() in JavaScript
The createEvent() method is used for creating an event object. It must be initialized before use and must be of the legal type.
composedPath() Event Method in JavaScript
The composedPath() method is used to return array of objects containing elements in event flow in correct execution order.
currentTarget Event Property in JavaScript
The currentTarget event property is used to return element whose event listeners triggered event.
defaultPrevented Event Property in JavaScript
The defaultPrevented event property is used to check whether or not preventDefault() method was called for the event.
eventPhase Event Property in JavaScript
The eventPhase event property is used to return number that indicates which phase of event flow is currently being evaluated.
isTrusted Event Property in JavaScript
The isTrusted event property is used to return Boolean values indicating whether or not the event is trusted.
preventDefault() Event Method in JavaScript
The preventDefault() method is used for canceling an event if it is cancelable.
stopImmediatePropagation() Event Method in JavaScript
The stopImmediatePropagation() method is used to prevent other listeners of the same event from being called.
stopPropagation() Event Method in JavaScript
The stopPropagation() method is used to prevent the propagation of the same event from being called.
target Event Property in JavaScript
The target event property is used to return element that triggered the event.
timeStamp Event Property in JavaScript
The timeStamp event property is used to return total number of milliseconds from which the document was finished loading until the specific event was created.
type Event Property in JavaScript
The type event property is used to return the type of the triggered event.
onafterprint Event in JavaScript
The onafterprint event is used to occur when a page has started printing or print dialogue box has been closed.
onbeforeprint Event in JavaScript
The onbeforeprint event fires when a page is about to be printed. It happens before the dialogue box appears.
oncanplay Event in JavaScript
The oncanplay event is used to trigger when the browser can start playing the specified media.
oncanplaythrough Event in JavaScript
The oncanplaythrough event occurs when the browser estimates that it can play through the specified audio/video without having to stop for buffering.
onchange Event in JavaScript
The onchange event fires the moment when the value of the element is changed.
onfullscreenchange Event in JavaScript
The onfullscreenchange event is used to trigger when an element is viewed in fullscreen mode.
fullscreenerror Event in JavaScript
The fullscreenerror event is used to trigger when an element can not be viewed in fullscreen mode even when it has been requested.
oninvalid Event in JavaScript
The oninvalid event occurs when a submittable input element is invalid like the input field is invalid if the required attribute is set and the field is empty.
onloadeddata Event in JavaScript
The onloadeddata event occurs when data for the current frame is loaded, but not enough data to play the next frame of the specified media.
onloadedmetadata Event in JavaScript
The onloadedmetadata event occurs when metadata for the specified audio or video has been loaded.
onoffline Event in JavaScript
The onoffline event is used to triggger when the browser starts to work offline.
ononline Event in JavaScript
The ononline event is used to trigger when the browser starts to work online.
onpause Event in JavaScript
The onpause event is used to fire when the audio or video is paused either programmatically or by the user.
onplay Event in JavaScript
The onplay event is used to trigger when the audio or video is just started or is no longer paused.
onplaying Event in JavaScript
The onplaying event is used to trigger when the audio or video has started playing after they have been paused or stopped for buffering.
onprogress Event in JavaScript
The onprogress event is used to trigger when the browser is downloading the specified audio or video.
onratechange Event in JavaScript
The onratechange event is used to trigger when the playing speed of the audio or video is changed.
onreset Event in JavaScript
The onreset event is used to trigger when a form is reset.
onseeked Event in JavaScript
The onseeked event is used to trigger when the user is finished moving or skipping to a new position in the audio or video.
onseeking Event in JavaScript
The onseeking event is used to trigger when the user starts moving or skipping to a new position in the audio or video.
onstalled Event in JavaScript
The onstalled event is used to trigger when the browser is trying to get media data but it is not available.
onsubmit Event in JavaScript
The onsubmit event is used to trigger when a form is submitted.
onsuspend Event in JavaScript
The onsuspend event is used to trigger when the browser is intentionally not getting media data.
ontimeupdate Event in JavaScript
The ontimeupdate event is used to trigger when the playing position of an audio or video has changed.
ontoggle Event in JavaScript
The ontoggle event is used to trigger when the user opens or closes a details element.
onwaiting Event in JavaScript
The onwaiting event is used to trigger when the video stops because it needs to buffer the next frame.