Shubham Vora has Published 962 Articles

How to change the font color of a text using JavaScript?

Shubham Vora

Shubham Vora

Updated on 12-Sep-2023 01:06:22

34K+ Views

This tutorial teaches us to change the font color of the text using JavaScript. While working with JavaScript and developing the frontend of the application, it needs to change the font color of the text using JavaScript when an event occurs. For example, we have an application which can turn ... Read More

How to perform string comparison in TypeScript?

Shubham Vora

Shubham Vora

Updated on 10-Sep-2023 08:16:41

35K+ Views

In this TypeScript tutorial, users will learn to make string comparisons. The string comparison is the basic operation required while working with any programming language. Suppose we are developing a web or Android application and need to compare string data such as user id, user name, password, etc. In such ... Read More

How to hide HTML element with JavaScript?

Shubham Vora

Shubham Vora

Updated on 10-Sep-2023 07:49:14

40K+ Views

In this tutorial, we will learn how to hide HTML element with JavaScript. Hiding an HTML element can be performed in different ways in JavaScript. In this tutorial, we will see the three most popular ways of doing it − Using the hidden property Using the style.display property ... Read More

How to include another HTML file in an HTML file?

Shubham Vora

Shubham Vora

Updated on 06-Sep-2023 21:51:46

44K+ Views

In this tutorial, we shall learn to include another HTML file in an HTML file. Various methods are available to include another HTML file in an HTML file. Let us quickly go through the techniques that have support on the web. Using JQuery load to include an HTML file In ... Read More

How do I call a JavaScript function on page load?

Shubham Vora

Shubham Vora

Updated on 06-Sep-2023 21:16:55

44K+ Views

This tutorial will teach us to call a JavaScript function on page load. In many cases, while programming with HTML and JavaScript, programmers need to call a function, while loading the web page or after the web page load finishes. For example, programmers need to show the welcome message to ... Read More

How to check whether a checkbox is checked in JavaScript?

Shubham Vora

Shubham Vora

Updated on 06-Sep-2023 14:13:45

44K+ Views

In this tutorial, we will learn to check whether a checkbox is checked in JavaScript. The checkbox is the input type in the HTML, which works as the selection box. The radio buttons which belong to the same group allow users to select only one value. Still, the checkbox which ... Read More

How can I remove the decimal part of JavaScript number?

Shubham Vora

Shubham Vora

Updated on 06-Sep-2023 10:51:38

40K+ Views

In this tutorial, we will learn to remove the decimal part of the number in JavaScript. While working with JavaScript, many times, developers need to play with the numbers stored in the database and needs to convert float and double numbers into the pure decimal or integer number.In this situation, ... Read More

How to pad a number with leading zeros in JavaScript?

Shubham Vora

Shubham Vora

Updated on 06-Sep-2023 10:20:39

51K+ Views

In this tutorial, we will learn how to pad a number with leading zeros in JavaScript. Padding a number can be done in different ways in JavaScript. In this tutorial, we will see the two most popular ways of doing it − Using the String padStart() method Using the ... Read More

How to determine if a number is odd or even in JavaScript?

Shubham Vora

Shubham Vora

Updated on 02-Sep-2023 15:30:06

38K+ Views

In this tutorial, let’s see how to determine whether a number is odd or even using JavaScript. The first step is understanding the logic. What are even numbers? Even numbers will be exactly divisible by 2. The remainder will be zero. What are odd numbers? Odd numbers will carry a ... Read More

How to stop refreshing the page on submit in JavaScript?

Shubham Vora

Shubham Vora

Updated on 02-Sep-2023 11:31:26

69K+ Views

In this tutorial, we shall learn to stop form refreshing the page on submitting in JavaScript. Let’s cover the methods to accomplish this objective. Using event.preventDefault() to stop page refresh on form submit In this section, we will see how to use event.preventDefault() to stop page refresh on form submission. ... Read More

Previous 1 ... 3 4 5 6 7 ... 97 Next
Advertisements