Posts

Showing posts from July, 2020

previousSibling,previousElementSibling, nextSibling and nextElementSibling under DOM Mnipulation and Traversing Methods

Image
previousSibling,previousElementSibling, nextSibling and nextElementSibling under DOM Mnipulation and Traversing Methods

firstChild and lastChild methods under DOM Traversing methods

Image
firstChild and lastChild methods under DOM Traversing methods | DOM Manipulations

how to access firstElementChild and lastElementChild of DOM in Javascript

Image
how to access firstElementChild and lastElementChild of DOM in Javascript

children method of DOM Manipulation

Image
children method of DOM Manipulation

parentElement and parentNode in Javascript under DOM Manipulation methods

Image
parentElement and parentNode in Javascript under DOM Manipulation methods

how to check the names of the classes within the code? Also how to add/replace/get the length of the classList and toggle various events using the classList method in Javscript

Image
how to check the names of the classes within the code? Also how to add/replace/get the length of the classList and toggle various events using the classList method in Javscript

how to add/remove/toggle/view by class list item wise and see the lenth of the classList using classList method in javscript

Image
how to add/remove/toggle/view by class list item wise and see the lenth of the classList using classList method in javscript

How to toggle classes or functions using classlist method in javascript

Image
How to toggle classes or functions using classlist method in javascript

Add and remove classes using classList method

Image
Add and remove classes using classList method

how to make use of useCapture in addEventListener in javscript

Image
how to make use of useCapture in addEventListener in javscript <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title>   <script src="main.js"></script> </head> <body> <div id="outer">       <h1 id="selector" style="border: 2px solid dodgerblue; padding : 2px"> RUSTIC TRAVEL JUNKIE</h1>       <p id="para">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ipsam blanditiis voluptatibus et, cumque expedita, quam ea! Dolorem obcaecati, fuga, culpa neque, repellat laudantium libero sed sint veritatis praesentium vitae cumque ratione eveniet optio, aspernatur ab. </p>       <button id="inner">

use of 'this' while using addeventListener mehtos in Javascript

Image
use of 'this' while using addeventListener mehtos in Javascript

second way of writing addEventListener() in Javascript

Image
second way of writing addEventListener() in Javascript

addEventListener() in DOM Manipulation Methods in Javascript

Image
HERE WE WILL LEARN ABOUT "addEventListener()" METHOD OF ADDING EVENTS <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title>   <script src="main.js"></script> </head> <body> <h1 id="selector" style="border: 2px solid dodgerblue; padding : 2px">RUSTIC TRAVEL JUNKIE</h1> <p id="para">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ipsam blanditiis voluptatibus et, cumque expedita, quam ea! Dolorem obcaecati, fuga, culpa neque, repellat laudantium libero sed sint veritatis praesentium vitae cumque ratione eveniet optio, aspernatur ab. Eveniet, quisquam veritatis quo maxime labore nostrum consectetur eaque cumque d

HOW TO ADD AND DELETE CLASS NAME USING JAVASCRIPT DOM MANIPULATION METHODS

Image
HOW TO ADD AND DELETE CLASS NAME USING JAVASCRIPT DOM MANIPULATION METHODS <!-- HERE WE WILL SEE THE CONCEPT OF ADDING/DELETING A  CLASS BY USING 'ByClassName'  METHOD UNDER DOM MANPULATION METHODS--> <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title>   <script src="main.js"></script> </head> <body> <h1 id="selector" style="border: 2px solid dodgerblue; padding : 2px">RUSTIC TRAVEL JUNKIE</h1> <p id="para">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ipsam blanditiis voluptatibus et, cumque expedita, quam ea! Dolorem obcaecati, fuga, culpa neque, repellat laudantium libero sed sint veritatis praesent

CSS STYLING IN JAVASCRIPT USING ByClassName DOM STYLING METHOD

Image
CSS STYLING IN JAVASCRIPT USING 'ByClassName' DOM STYLING METHOD <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title> </head> <body> <h1 id="selector" style="border: 2px solid dodgerblue; padding : 2px">RUSTIC TRAVEL JUNKIE</h1> <p id="para">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ipsam blanditiis voluptatibus et, cumque expedita, quam ea! Dolorem obcaecati, fuga, culpa neque, repellat laudantium libero sed sint veritatis praesentium vitae cumque ratione eveniet optio, aspernatur ab. Eveniet, quisquam veritatis quo maxime labore nostrum consectetur eaque cumque distinctio vel doloremque sunt unde harum placeat, quam perfere

Dom CSS styling methods - By style, ClassName and by ClassList

Image
 Dom CSS styling methods - By style <!--  SO OUT HERE WE WILL TRY TO ACCESS THE BORDER PROPERTY OF THE STYLE ATTRIBUTE. BY USE OF querySelectorAll() using style property  --> <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title> </head> <body> <h1 id="selector" class="name" style="border: 2px solid dodgerblue; padding : 2px">RUSTIC TRAVEL JUNKIE</h1> <div id="selector1" class="name">   <h1 style="border: padding : 2px">RTJ</h1> </div> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ipsam blanditiis voluptatibus et, cumque expedita, quam ea! Dolorem obcaecati, fuga, culpa neque, r

querySelector() and querySelectorAll() in Dom Manipulations Methods in Javascript

Image
querySelector() and querySelectorAll()

How to change images on mouse hover using javascript | mouse hover events

Image
How to change images on mouse hover using javascript | mouse hover events <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title> </head> <body>   <img id="photo" onmouseover="box3()" onmouseout="box4()" src="1.png" width="200px" height="100px" > //remember to change source of photo <script> function box3() {   document.getElementById("photo").src="2.jpg"; //remember to change source of photo } function box4() {   document.getElementById("photo").src="1.png"; //remember to change source of photo } </script> Here is how the output looks like :

DOM Manipulation | How to get elements using ID , Class and Tags with working code and output snaps(Also covered "how to change CSS styles of different tags using JS")

Image
 How to get elements using ID , Class and Tags in Javscript  /*HERE IS THE CODE . JUST COPY AND PASTE IN YOUR TEXT EDITOR*/ <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title> </head> <body>         <h1 class="header-tag" style="text-align:center; color:red;">EXERCISE</h1>           <p>Lorem ipsum dolor sit amet.</p>           <p>Lorem ipsum dolor sit amet.</p>           <p>Lorem ipsum dolor sit amet.</p>           <p>Lorem ipsum dolor sit amet.</p>           <p>Lorem ipsum dolor sit amet.</p>           <div id="alone">             <h3>Lorem ipsum dolor sit amet, consectetur adipisicing eli

Practice Exercise for drop down selection using DOM Manipulation

Image
Practice Exercise for drop down selection using DOM Manipulation

Javascript Radio button Exercise with working code and output snaps - DOM Manipulation Exercise

Image
Javascript Radio button Exercise with working code and output snaps So here is the working code(Just copy and paste in your text editor): <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Javascript Radio button Exercise with working code and output snaps</title> </head> <body>     <div class="wrapper">         <div id="header">           <h1 class="header-tag" style="text-align:center; color:red;">EXERCISE</h1>         <input type="radio" name="radio1" id="box1" value="RUSTIC TRAVEL JUNKIE">RUSTIC TRAVEL JUNKIE</input><br><br>         <input type="radio" name="radio1"

Javascript username and password matching exercise with working code and snaps

Image
Javascript username and password matching exercise with working code and snaps

DOM in Javascript - how to get/set all ID, CLASS and TAGS (full information with working code)

Image
DOM in Javascript - how to get ID, CLASS and TAGS (full information with working code) /*This is the simple HTML and Javascript Code we will use */ <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <meta http-equiv="X-UA-Compatible" content="ie=edge">   <title>Test Page</title> </head> <body>     <div class="wrapper">         <div id="header">           <h1 class="header-tag" style="text-align:center; color:red;">THIS IS A SAMPLE SITE</h1>           <div id="main">             <ul>               <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facilis molestias enim adipisci nisi, aut official.HELLO</li>               <li>Lorem ipsum dolor sit amet, consectetur adi

How to get Date using Date() Method in Javascript??

Image
How to get Date using Date() Method in Javascript??

Date() Methods in Javascript

Image
Date() Methods in Javascript

HOW TO USE VALUE OF PI IN JAVASCRIPT

Image
HOW TO USE VALUE OF PI IN JAVASCRIPT

Absolute() method in Javascript

Image
Absolute() Math method in Javascript

How to generate random numbers in Javascript

Image
How to generate random numbers in Javascript??

Random() and Power() math Methods in Javascript

Image
Random() and Power() math Methods in Javascript

sqrt() and cbrt() methods in Javascript

Image
sqrt() and cbrt() methods in Javascript

Max() and Min() methods in Javascript

Image
Max() and Min() methods in Javascript

Trunc() and Round() math methods in Javascript

Image
Trunc() and Round() math methods in Javascript

Ceil() and Floor() math functions in Javascript

Image
Ceil() and Floor() math functions in Javascript

toFixed() and toPrecision() - number methods in Javascript

Image
toFixed() and toPrecision() - number methods in Javascript

Testing various values using isFinite() and isInteger()

Image
Testing various values using isFinite() and isInteger()

isFinite() and isInteger() methods in Javascript

Image
isFinite() and isInteger() methods in JS

parseInt and parseFloat methods in javascript

Image
parseInt and parseFloat methods in javascript   

Number() method in Javscript

Image
Number() method in Javscript

Tutorial covering all the methods in Javascipt using strings

Image
Tutorial covering all the methods in Javascipt using strings

toString() in javascript using strings

Image
toString() in javascript using strings

substr() in strings using JS

Image
substr() in strings using JS

slice() using strings in Javascript

Image
slice() using strings in Javascript

Repeat() using strings in JS

Image
Repeat() using strings in JS

split method using string in Javascript

Image
Split method using string in Javascript

Concat method using strings in Javascript

Image
Concat method using strings in Javascript

fromCharCode() method using string in JS

Image
fromCharCode() method using string in JS

charCodeAt() using strings in JS

Image
charCodeAt() using strings in JS

charAt() in JS using strings

Image
charAt() in JS using strings

Trim() using strings in Javascript

Image
Trim() using strings in Javascript

replace() using strings in JS

Image
replace() using strings in JS

indexOf() and lastIndexOf() using Strings in Javascript

Image
indexOf() and lastIndexOf() using Strings in Javascript

match() in Javascript

Image
match() in Javascript

search() in Javascript

Image
👉 search() in Javascript 👈

startsWith() and endsWith() in Javascript

Image
👉  startsWith() and endsWith() in Javascript   👈

includes() method in JS

Image
includes() in JS  

toUpperCase() and toLowerCase() methods in JS

Image
toUpperCase() and toLowerCase() methods in JS 

Method for length of string in JS

Image
String method for length 

Map in JS

Image
Map in JS

for in loop in JS

Image
for in loop in JS

how to change const values in array using JS

Image
how to change const values in array using JS

Array of objects in JS

Image
Array of objects in JS

This keyword in JS

Image
This keyword in JS

function within a function in JS

Image
function within a function in JS 👈

Constructors in JS

Image
Constructors in JS

valueOf() in JS

Image
valueOf() in JS

Filter method in JS

Image
Filter method in JS

findIndex() in JS

Image
findIndex() in JS

find() in JS

Image
Find() in JS

includes() in Javascript

Image
includes() in Javascript 

Slice and Splice methods using Arrays in Java script

Image
Slice and Splice methods using Arrays in Java script

indexof() and lastindexOf() for arrays in javascript

Image
indexof() and lastindexOf()  for arrays  in javascript

JAVASCRIPT CONCAT AND JOIN METHODS

Image
JAVASCRIPT CONCAT AND JOIN METHODS

JAVASCRIPT pop push shift unshift methods

Image
JAVASCRIPT pop push shift unshift methods

sort() and reverse() methods in javascript

Image
sort() and reverse() methods in javascript

Getting user data in the form of array and printing it using javascript!!

Image
Getting user data in the form of array and printing it using javascript!!

MULTIDIMENSIONAL ARRAY : PRINTING TABLES

Image
MULTIDIMENSIONAL ARRAY : PRINTING TABLES

CODE FOR BASIC CLICK EVENTS

CODE FOR BASIC CLICK EVENTS

Printing a table using javascript by taking input from user

TAKING INPUT FROM USER AND PRINTING TABLE OF A PARTICULAR NUMBER

Prompt box, alert box and confirm box in JS(using Switch Case)

This Code basically shows the usage of alert box, prompt box and confirm box in javascript