AmitDiwan has Published 10740 Articles

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

528 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

751 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

210 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

495 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

142 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

168 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

Combining multiple images into a single one using JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:55:27

7K+ Views

Following is the code for combining multiple images into a single one using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } Combining multiple images into a single one ... Read More

Advertisements