Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Web Development Articles
Page 137 of 801
How to Create an Animated Typing Effect using typed.js
Overview Typed.js is a JavaScript animation library that creates realistic typing effects for web text. You can add it to your project via CDN, NPM, or Yarn. The library animates text by typing and deleting characters, simulating human typing behavior with customizable speed and effects. Syntax The basic syntax to create a Typed.js animation is: var typed = new Typed(selector, options); Where selector is the CSS selector (ID or class) of the target element, and options is an object containing configuration properties like strings, typing speed, and loop settings. Installation Add Typed.js to your project using ...
Read MoreHow to place cursor position at end of text in text input field using JavaScript?
In HTML, the input field is used to take input from the users. Sometimes, we require to take string or long text messages in the input. In these scenarios, users may need to go to the end of the input field to add more content or message. So, we should set up something such that users can click the button, can go to the end of the input field. In this tutorial, we will learn to use JavaScript to place the cursor position at the end of the text in the input field. Using the setSelectionRange() method The ...
Read MoreHow to play a notification sound on websites?
Nowadays, web development continues to evolve and find new ways to improve the user experience. One way to improve the user's experience is by adding notifications to the website to notify users of any event. Before we start with the tutorial, let's understand why we need notifications with sounds on the website. Why Add Notification Sounds? As we said above, notification is used to enhance the user experience. We can use it to notify users for a task, such as when users completes the form submission, get a message in the chat app, for reminders, etc. ...
Read MoreHow to read all spans of a div dynamically?
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 ...
Read MoreHow to remove “disabled” attribute from HTML input element using JavaScript?
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 MoreHow to remove an added list items using JavaScript?
In HTML, developers can use the 'ul' tag to create a list of items. We can add all related items to the single list and manage them dynamically using JavaScript. Sometimes, developers need to add or remove list items programmatically. We can access specific list items using their attributes and use the removeChild() method to remove them from the DOM. In this tutorial, we will explore different methods to remove list items using JavaScript, including removing specific items, the last item, and all items at once. Syntax Users can follow the syntax below to remove list ...
Read MoreDetect the Operating System of User using JavaScript
JavaScript can detect a user's operating system to provide customized experiences, different interfaces, or platform-specific features. This capability is particularly useful for web applications that need to adapt their behavior based on the user's platform. In this tutorial, we'll explore two primary methods for detecting the operating system using JavaScript: The navigator.platform property The navigator.userAgent property Each method has its strengths and limitations. We'll examine both approaches with practical examples to help you choose the best solution for your needs. Using navigator.platform Property The navigator.platform property returns a string identifying the platform on ...
Read MoreCreating a Progress Bar using JavaScript
JavaScript is a powerful language that allows web developers to create dynamic and interactive web pages. 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 take to complete. We will use JavaScript to update the progress bar as the task progresses, giving the user a visual ...
Read MoreHow to Scrape a Website using Puppeteer.js?
Web scraping is one of the best ways to automate the process of data collection from the web. A web scraper, often called a "crawler, " surfs the web and extracts data from selected pages. This automation is much easier than manually extracting data from different web pages and provides a solution when websites don't offer APIs for data access. In this tutorial, we will create a web scraper in Node.js using Puppeteer.js to extract book information from a sample website. What is Puppeteer.js? Puppeteer is a Node.js library that provides a high-level API to control Chrome ...
Read MoreWorking with Excel Files using Excel.js
Excel.js is a powerful Node.js library for reading, manipulating, and writing Excel files. It supports both XLSX and CSV formats, making it ideal for data processing applications. Installation To install Excel.js in your Node.js project, run the following command: npm install exceljs Once installed, you can start working with Excel files programmatically. All examples in this tutorial work with XLSX (Open XML Spreadsheet) files. Working with Excel Cells The getCell() method allows you to access individual cells by reference or coordinates. Here's how to read cell values: const Excel = ...
Read More