Found 6685 Articles for Javascript

How to Bundle up JavaScript Files using Rollup.js?

Mukul Latiyan
Updated on 22-Jun-2023 13:27:54

419 Views

In this tutorial, we will understand how to use rollup.js to bundle JavaScript files. Before we do that, the first step is to get familiar with the JavaScript module bundler called Rollup, which compiles the files of multiple sources into a single bundle. Rollup is similar to webpack and Browserify. It is more popular than many of the other bundlers out there because of its ability to keep the files small even after bundling them into a single unit. There are multiple features that Rollup brings to the table, some of them are mentioned below − Development is ... Read More

How to Build a REST API with Fastify?

Mukul Latiyan
Updated on 22-Jun-2023 13:21:46

1K+ Views

Fastify is a framework that is mainly designed to do backend development in JavaScript. It is one of the lightest backend framework that one can work with, and it is one of the main reasons why it is preferred if you want to avoid the heavier node frameworks like Express and Hapi. Since its inception, multiple versions of Fastify have been released. In the latest version, we get the capability to even verify the incoming and outgoing requests as well as the request parameters. It might not come as a surprise that the people who developed Fastify claim that it ... Read More

Creating a Progress Bar using JavaScript

Prince Yadav
Updated on 29-May-2023 14:34:57

3K+ Views

JavaScript is a powerful language that allows web developers to create dynamic and interactive web pages. It can be used to add a wide range of features to a website, such as a form validation, animation, and more. One of the most useful features that JavaScript can be used for is creating a progress bar. In this tutorial, we will walk you through the process of creating a progress bar using JavaScript. A progress bar is a graphical representation of the progress of a task, and can be used to give the user feedback on how long a task will ... Read More

Detect the Operating System of User using JavaScript

Prince Yadav
Updated on 18-May-2023 15:39:43

5K+ Views

JavaScript is a versatile and dynamic programming language that has become an indispensable part of the web development world. Its ease of use and ability to bring interactivity to websites has made it incredibly popular among developers. JavaScript is capable of creating a wide range of applications, from simple interactive elements on websites to complex web-based applications. In this tutorial, we're going to show how you can use JavaScript features to find out what operating system your website visitors are using. Knowing this information can be very useful in giving them a customized experience. You can change the look of ... Read More

Detect Whether a Device is iOS or Not Using JavaScript

Prince Yadav
Updated on 18-May-2023 15:33:46

11K+ Views

JavaScript is a high-level, interpreted programming language that is widely used for developing dynamic and interactive web applications. Its versatility and ease of use have made it one of the most popular programming languages in the world. In this tutorial, we'll explore how to use JavaScript to detect whether a device is running iOS or not. Knowing the type of device your users are accessing your web application from is crucial as a software developer. This information can be used to provide a better user experience or to customize the layout and functionality of your web application. In this section, ... Read More

How to replace an HTML element with another one using JavaScript?

Shubham Vora
Updated on 17-May-2023 12:45:45

13K+ Views

In this tutorial, we will learn to replace an HTML element with another one using JavaScript. In some use cases, we require to replace a whole HTML element with a different one. For example, it is very important in the form validation. Suppose we are taking the user’s age from the form, and the user enters the wrong age; we can show the validation message by replacing the HTML element. Another use case where we require to replace an HTML element with another one is dynamic content loading, in which we must show the web page content based on certain ... Read More

How to remove underline from link using JavaScript?

Shubham Vora
Updated on 17-May-2023 12:39:36

805 Views

Whenever we use tag in the HTML, it shows the anchor text with the underline on the web page. Sometimes, underlining looks very annoying, and we require to remove the underline from JavaScript. The ‘textDecoration’ property of the style object allows developers to remove the line from the anchor text. Also, developers can use different values for the ‘textDecoration’ CSS property to style text in different ways. Syntax Users can follow the syntax below to use the textDecoration CSS property to remove the underline from the link using JavaScript. x.style.textDecoration = "none"; In the above syntax, we set ... Read More

How to remove CSS property using JavaScript?

Shubham Vora
Updated on 28-Jun-2024 10:18:54

15K+ Views

To remove CSS property using JavaScript, it can be helpful in various aspects like removing unnecessary style property, increase the performance, can be easily maintained and and debugging becomes easier. In this article we are having a div element and in some approaches p element on which some CSS properties have veen applied. Our task is to remove applied CSS property using JavaScript. Approaches to Remove CSS property using JavaScript There are various ways to remove CSS property using JavaScript, here is a list of approaches with step wise explaination and complete example codes. Using ... Read More

How to Remove Column from HTML Table using JavaScript?

Shubham Vora
Updated on 17-May-2023 12:22:01

2K+ Views

In HTML, the table is used to show the data on the web page in a formatted way. The table contains the columns and rows to show the data. Sometimes, developers need to delete the table column or allow users to delete them. For example, the table contains the users’ data and has the ‘age’ and ‘birthdate’ columns. In such cases, we require to delete the ‘age’ column as we can get the age from the ‘birthdate’ column. Developers can use the deleteCell() method to delete any particular column. In this tutorial, we will learn to delete the ... Read More

How to remove an added list items using JavaScript?

Shubham Vora
Updated on 17-May-2023 12:12:02

5K+ Views

In HTML, developers can use the ‘ul’ tag to create a list of items. We can add all related items to the single list. We can also manage the list items using JavaScript. Sometimes, developers require to add or remove list items using JavaScript. We can access the list items using the particular attribute value and use the removechild() method to remove the list item. In this tutorial, we will take the input from the users, and according to the value, we will remove the list item. Syntax Users can follow the syntax below to remove an added list items ... Read More

Advertisements