Apply Style/CSS using JS

Example : How to change the style/css of html element’s using Java Script. Example : How to hide/display the contents of html element’s using Java Script. Example : How to display the hide contents of html element’s using Java Script.

Loading

Misc. Codes in JS

Example : How to Use/Call External JavaScript file in an HTML Page. Example : How to move the cursor in the next HTML element/control/box by pressing Enter key/button [Enter Key Event]. Example : How to redirect/forward web page using Java Script [Redirect Page]. …

Loading

JS Class & Objects

JS Classes In JavaScript, classes were introduced in ECMAScript 2015 (ES6) as a new way of defining objects and object-oriented programming. A class in JavaScript is a blueprint for creating objects with properties and methods. To create a class in …

Loading

JS Functions

Definition Function is a named block of statements which can be executed/used as per need again and again in the program simply by writing its name and can return some value. Features It is useful in making a program modular …

Loading

JS Events

Introduction JavaScript’s interaction with HTML is handled through various events that usually occur when the user or the browser manipulates a web page. Definition An event is an activity associated with certain manipulation occurring with a web page. Features Events …

Loading

JS String Examples

Example : A JS program to display string output. Example : A JS program to display the string length. Example : A JS program to accept string from user and display them. Example : A JS program to display a …

Loading

JS Array

Introduction In JavaScript, an array is a multivariant & linear container to store different types of data. Definition In JavaScript, an array is a data structure that can store a collection of values of any data type, including numbers, strings, …

Loading

JS Control Statements

JS control statements are categorized into – (A) Decision Statements (B) Looping Statements (C) Jumping Statements (A) Decision/Conditional Statements: JavaScript supports the following decision statements:- (I) If statement (II) If-else statement (III) Else-if statement (IV) Switch case statement (I) If …

Loading

JS Operators

Introduction of JS Expression: An expression is a combination of operators and operands that can be evaluated. It may also include function calls which return values. For example –  x=23.5; z=x+y; x=”welcome”; Operators: Operators are symbols which is used to …

Loading

JS DataTypes

JS Keywords/Reserve Words : These words cannot be used as JavaScript variables, functions, methods, loop labels, or any object names by the programmers in their programs. A list of all the reserved words in JavaScript are – abstract, boolean, break, …

Loading