Web Development Articles - Page 107 of 801

Explain Handler Method in ES6

Prabhdeep Singh
Updated on 17-Mar-2023 13:47:07

251 Views

ES6 is referred to as ECMAScript 6. ES6 is the sixth version of ECMAScript, which was released in 2015 and is sometimes known as ECMAScript 2015. ECMAScript was developed to standardize JavaScript. Further in this article, we are going to discuss Handler Methods in ES6 in detail. Introduction to ES6 As we Know ES6 (ECMAScript 6) is introduced for the standardization of JavaScript. It is a programming language and in ES6 we don't have to need to write a number of lines of code or we can say we have to write less and accomplish more. JavaScript follows the ES6 ... Read More

Explain Constants in ES6

Prabhdeep Singh
Updated on 17-Mar-2023 13:42:54

246 Views

Debugging is a very hectic process for the developers or the programmer and a minor mistake can lead to major problems like changing a single variable will change the whole code and will become very difficult to detect. Sometimes there are some variables that are not going to change through the code and if by mistake their value got changed or updated by the user then they will not come in first thought that there may be a change in them. To overcome these issues there is a concept defined in the ES6 that if the user knows that a ... Read More

Explain Chosen and Select2 with Examples

Prabhdeep Singh
Updated on 17-Mar-2023 13:28:21

1K+ Views

There are two jQuery plugins that can we use to style the select boxes that are Select2 and Chosen. Both the plugins Select2 and Chosen are improving the look of the selected boxes and enhancing the behavior of the boxes which leads to the make them user-friendly. Also, both of these plugins can be used for multiple selected boxes as well as single selected boxes. Chosen JavaScript plugin that creates the select boxes user-friendly that is chosen. Chosen is available in both the prototype and JQuery versions. Features of the Chosen User-friendly Your users won't have to slog through a ... Read More

How to change the href value of <a> tag after clicking on button using JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:17:17

11K+ Views

The href attribute specifies the link’s destination, which can be a URL or an anchor point within the same document. Changing the attribute value of href which allows us to dynamically update the destination of the link, which can be useful in a variety of situations. Generally, the tag is used to create a hyperlink in HTML. stands for anchor tag, and it is used to link the other web pages or to specify the exact locations within the same page. On the other side, the href attribute is used to specify the link’s destination, which can be ... Read More

How to change the font-weight of a text using JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:12:46

1K+ Views

Using JavaScript is one of the most famous ways to change the font-weight of any text on your webpage. We can build interactive applications using JavaScript with HTML elements. Font weight refers to the boldness or thinness of the characters. In this article, we will see how we can change the font-weight of a text using JavaScript. Using the Style fontWeight Property Let us see how can we change the font weight of a single element, such as a paragraph or a heading. To do this, we will use the ‘style.fontWeight’ property of the element. This property is an object ... Read More

How to change font style using drop-down list in JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:03:11

6K+ Views

We can use the style fontFamily property to change font style using drop-down list in JavaScript. To make the font change effective using the drop-down list, we can use onchange event when an option is selected in the drop down list. Before we move further, let us know in detail about the drop-down list. A drop-down list is a switchable menu which enables the user to select the one item from a various option. These options can be defined using the HTML code, which are connected to a function. These functions are triggered and starts operating whenever you click or ... Read More

How to change Input box borders after filling the box using JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:01:21

2K+ Views

The style.border property is used to change the element’s border, and it returns the three border-bottom properties, i.e., border-color, border-style, and border-width of the element. It is one of the HTML Style Object properties. We use onchange event to make changes effective after filling the box. The onchange is one of the JavaScript attribute and it occurs when the value of an HTML element is changed. It also works with the radio buttons and checkboxes, when the checked state is changed. The onchange event can also work with the HTML element. The onchange event is quite similar to the ... Read More

How to Change the Background Color after Clicking the Button in JavaScript?

Gungi Mahesh
Updated on 22-Nov-2024 17:35:20

20K+ Views

To change the background color after clicking the button in JavaScript, we are going to discuss two different approaches. We have to perform two simple task, that is, adding a click event and changing the background color of the document. In this article our task is to understand how to change the background color after clicking the button in JavaScript. Approaches to Change Background Color on Clicking Button Here is a list of approaches to change the background color after clicking the button in JavaScript which we will be discussing in this article with stepwise explaination and complete example codes. ... Read More

Fastest way to convert JavaScript NodeList to Array

Shubham Vora
Updated on 17-Mar-2023 12:37:14

2K+ Views

In this tutorial, we will learn the fastest way to convert JavaScript NodeList to Array. NodeList is a similar structure to an array; it is a collection of DOM (Document Object Model) elements. However, array methods like ‘map( )’, ‘filter( )’, and ‘slice( )’ cannot be used on NodeList objects. There are so many ways to convert NodeList to Array, but this task can be done faster using these two ways − By iterating for loop Using Array.from( ) function By iterating for loop In JavaScript, we can use for loop to iterate over the NodeList to get ... Read More

Explosion Animation in Canvas

Shubham Vora
Updated on 17-Mar-2023 12:26:44

1K+ Views

In this tutorial, we will learn to create an explosion animation effect using canvas in HTML. Using canvas, we can draw graphics on a web page in an easy and powerful way. Let’s see some examples of creating explosion animation in canvas. Explosion Animation 1 We will create an explosion of 50 randomly colored particles that originate from the center of the canvas and move in random directions. The particles will continue to move until the page is refreshed. Algorithm Step 1 − Create an HTML canvas element with an id of "explosion" and set its dimensions to 400x400 ... Read More

Advertisements