Javascript Articles

Page 41 of 534

Design a Digital Clock in Neumorphism Style using JavaScript

Imran Alam
Imran Alam
Updated on 15-Mar-2026 501 Views

In this tutorial, we will be discussing how to design a digital clock in neumorphism style using JavaScript. Neumorphism is a design trend characterized by soft, raised elements with subtle shadows that create an embossed or pressed effect on the interface. HTML Structure Let's start by creating the basic HTML structure for our neumorphic digital clock. We need a container for the clock and display elements. Neumorphic Digital Clock ...

Read More

How is Ajax different from JavaScript Libraries and Run Time Environments?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 400 Views

This article explores AJAX (Asynchronous JavaScript and XML) and clarifies how it differs from JavaScript libraries and runtime environments in web development. AJAX Introduction and History Ajax, short for Asynchronous JavaScript and XML, is a technique for creating dynamic and interactive web applications. It was first introduced in the early 2000s and has since become a staple of modern web development. The key feature of Ajax is its ability to update parts of a web page without requiring a full page reload. This is achieved by using JavaScript to send and receive data from a server asynchronously, ...

Read More

How to check the type of a variable or object in JavaScript?

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 12K+ Views

JavaScript is a loosely typed programming language, meaning there is no such rule to declare the variable type. A variable can store multiple data types in a program, so it is essential to understand the variable type before using it. In JavaScript, we can use the typeof operator to check the type of a variable or object. The typeof operator takes a variable and returns its type in a string format. In addition to the typeof operator, JavaScript also provides the instanceof operator to check the type of a variable or object. The instanceof operator accepts two arguments: the ...

Read More

How to create a hash from a string in JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 8K+ Views

Before we start, let's understand the hash in JavaScript. The hash is also a string, but it's encrypted using a particular algorithm. Generally, we use the hash for security purposes. For example, Google stores users' emails and passwords in their database. Now, Google's employees can access their database for development purposes. But can they get the user's email and password from the database? No, because the password is stored in the hash form, and to decrypt the password, the employee needs the key which we used while creating the hash from the password string. So, in such a ...

Read More

How to store all dates in an array present in between given two dates in JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 3K+ Views

Sometimes, we require to get all the dates between the given date range. In this tutorial, we will take two dates and find all dates between two dates. Also, we will store all dates in the array. Here, we will learn three approaches to storing all dates in an array present between given two dates in JavaScript. Using the while loop and setDate() method We can use the while loop for iteration and the setDate() method to set dates in the date object. On every iteration of the while loop, we can increase the date by one ...

Read More

How to swap the key and value of JSON element using JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 3K+ Views

Here, we will learn to swap the key and value of JSON elements using JavaScript. In JavaScript, an object stores key-value pairs, and we can swap the key and value just like swapping two normal variables. In this tutorial, we will learn different approaches to swapping all the key-values of JSON elements using JavaScript. Using the for...in Loop We can iterate through the keys of the JSON object using a for...in loop. After that, we can access the value from the object using the key and swap every key-value pair in the object. We need to ...

Read More

How to Create a Binary Calculator using HTML, CSS and JavaScript?

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 2K+ Views

A binary calculator is a program that performs mathematical calculations on binary numbers. Binary numbers consist of only two digits: 0 and 1. In this tutorial, we'll create a functional binary calculator that can perform addition, subtraction, multiplication, and division operations using HTML for structure, CSS for styling, and JavaScript for functionality. HTML Structure First, let's create the HTML structure with a form containing a display field and buttons for binary digits and operations: Binary Calculator ...

Read More

FabricJS – How to set the dash pattern of the controlling corners of a Line?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 256 Views

In this tutorial, we are going to learn about how to set the dash pattern of controlling corners of Line using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. We can also specify a dash pattern for the controlling corners by using the cornerDashArray ...

Read More

How to create a button that submits a form and downloads a pdf simultaneously?

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 3K+ Views

By using HTML, JavaScript and jsPDF, we can create a button that can submit the form and download a PDF simultaneously. We will use HTML to create a form, JavaScript to handle the submission process and jsPDF to generate the PDF document. This is a common requirement in web applications where users need to submit data and receive a PDF receipt or confirmation document. Setting Up the Form First, let's create a basic HTML form with input fields to collect user information: Contact Form Enter your Name: ...

Read More

How to send row data when clicking the button using javascript?

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 9K+ Views

When working with HTML tables, you often need to access row data when a user clicks a button. This is useful for editing, deleting, or sending data to a server. We'll explore two methods: vanilla JavaScript and jQuery. Using JavaScript to Access Row Data In this approach, we access the clicked button element, traverse up to find its parent row, then extract all column data from that row. Syntax var clickedRow = clickedElement.parentNode.parentNode.id; var rowData = document.getElementById(clickedRow).querySelectorAll('.column-data'); let text = rowData[0].innerHTML; The clickedRow contains the row ID, rowData contains all columns, and we ...

Read More
Showing 401–410 of 5,340 articles
« Prev 1 39 40 41 42 43 534 Next »
Advertisements