AmitDiwan has Published 10744 Articles

How to get the child element of a parent using JavaScript?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:19:35

567 Views

Following is the code for getting the child element of a parent using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .child1,    .child2,    .child3 {       display: none;   ... Read More

What are the uses of the JavaScript WITH statement?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:17:43

1K+ Views

The WITH statement is used to specify the default object for the given property and allow us to prevent writing long lengthy object references. It adds the given object to the head of the scope chain.Following is the code for with statement in JavaScript −Example Live Demo ... Read More

Accessing a parent Element using JavaScript

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:16:54

493 Views

Following is the code for accessing a parent element using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       font-weight: 500;       ... Read More

How to check whether a Button is clicked with JavaScript?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:14:56

1K+ Views

Following is the code for checking whether a button is clicked using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       font-weight: 500;   ... Read More

Alert for unsaved changes in form in JavaScript

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:13:19

706 Views

Following is the code to display an alert for form’s unsaved changes in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    input {       margin: 10px;    } ... Read More

JavaScript code to find the coordinates of every link in a page

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:12:52

187 Views

Following is the code to find the coordinates of every link in a page using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       ... Read More

Circle coordinates to array in JavaScript

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:11:39

465 Views

Following is the code to circle coordinates to array in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-weight: 500;       font-size: 18px;       ... Read More

Program to retrieve the text contents of the user selection using JavaScript.

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:08:57

127 Views

Following is the code to retrieve the text contents of the user selection using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result, .sample {       font-size: 20px;       ... Read More

Select and Deselect Text Inside an Element using JavaScript

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:06:25

3K+ Views

Following is the code to select and deselect text inside an element using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500; ... Read More

JavaScript code to de-select text on HTML page.

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 07:02:12

144 Views

Following is the code to de-select text on HTML page −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;       color: ... Read More

Advertisements