Found 6896 Articles for Javascript

Creating a Progress Bar using JavaScript

Prince Yadav
Updated on 29-May-2023 14:34:57
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
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
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
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
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 17-May-2023 12:27:10
Sometimes, we require to remove CSS properties from HTML elements after performing some tasks. For example, users haven’t paid the subscription fees for your application. So, you are showing the ‘payment due’ message in the header section with a ‘red’ color. Once the user clears the payment, you can change the content of the header and remove the ‘color: red’ property to set the initial color. There are lots of use cases in which we require to remove CSS property from the HTML element. Here, we will learn different approaches to removing CSS properties. Using the removeProperty() method The first ... Read More

How to Remove Column from HTML Table using JavaScript?

Shubham Vora
Updated on 17-May-2023 12:22:01
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
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

How to remove “disabled” attribute from HTML input element using JavaScript?

Shubham Vora
Updated on 17-May-2023 12:07:38
In HTML, we can use input elements to take input from the users by creating a form or in any other way. There are different types of input elements, such as checkboxes, radio buttons, text, numbers, etc. We can use the ‘disabled’ property with every element to disable the input field and stop users from interacting with the input element. In some cases, we require to add and remove the disabled attribute using JavaScript. For example, we want to take the pan card numbers of the users whose age is greater than 18. So, we require to enable the ... Read More

How to read all spans of a div dynamically?

Shubham Vora
Updated on 17-May-2023 12:02:03
One HTML element can contain multiple nested HTML elements while creating web pages. In some cases, developers may require to read the particular HTML elements of one HTML element. In our case, we require to read all span elements of the div element and extract the content of them. In this tutorial, we will learn to read the content of all spans of a div element using JavaScript and again append it to the web page in the formatted way. Syntax Users can follow the syntax below to read all spans of a div element dynamically using JavaScript. var spans ... Read More
1 2 3 4 5 ... 690 Next
Advertisements