Shubham Vora has Published 957 Articles

How to include inline JavaScript inside an HTML page?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:45:03

9K+ Views

In this tutorial, we will learn how to include inline JavaScript inside an HTML page. Include inline JavaScript using onclick Event Just like an alert message showing up from the inline JavaScript inside an HTML page, we can also declare a function and call it. This method enabled us to ... Read More

How to prevent duplicate JavaScript Variables Declaration?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:42:57

1K+ Views

In this tutorial, we will look at a few ways to prevent duplicate JavaScript variable declarations and comparison between them from understanding which one is suitable in a given context. The best way to prevent duplicate variable declaration is to avoid creating global variables. Let’s move forward to discuss this. ... Read More

How to perform numeric sort in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:39:30

12K+ Views

In this tutorial, we will learn how to perform the numeric Sort in JavaScript. We can arrange the given numerical values by numerical sorting into ascending or descending order In JavaScript, we use the sort () method to sort numerical values. This method sorts the arrays of numbers, strings, and ... Read More

How to perform integer division and get the remainder in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:38:18

2K+ Views

In this tutorial, we will learn how to perform integer division and get the remainder in JavaScript. The division operator (/) returns the quotient of its operands, where the dividend is on the left, and the divisor is on the right. When another splits one operand, the remainder operator (%) ... Read More

How to load the previous URL in the history list in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:33:47

6K+ Views

In this tutorial, we will learn to load the previous page in the history list in JavaScript. The Window object in JavaScript accesses the window in the browser. This object contains many properties and methods required to do the tasks. The Window object also retrieves the information from the browser ... Read More

How to load the next URL in the history list in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:31:40

774 Views

In this tutorial, we will learn to load the next page in the history list in JavaScript. The Window object in JavaScript accesses the window in the browser. This object contains many properties and methods required to do the tasks. The Window object also retrieves the information from the browser ... Read More

How to get the hash part of the href attribute of an area in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 13:28:28

716 Views

In this tutorial, we will learn how to get the hash part of the href attribute of an area in JavaScript. The HTML element establishes an area within an image map with predetermined clickable zones. An image map allows you to correlate geometric regions of a picture with hypertext ... Read More

How to get the value of the rel attribute of a link in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 09:15:29

3K+ Views

In this tutorial, we will learn how to get the value of the rel attribute of a link in JavaScript. The rel attribute expressed the relationship between the current document or website and the linked document or website. The search engine uses this attribute to get more information about the ... Read More

How to get the value of the id attribute a link in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 09:12:25

9K+ Views

In this tutorial, we will learn how to get the value of the id attribute a link in JavaScript. The id attribute stores a unique value for an HTML element. The id of an element must be unique, and no other elements should not have the same id. The id ... Read More

How to get the value of the hreflang attribute of a link in JavaScript?

Shubham Vora

Shubham Vora

Updated on 14-Sep-2022 09:09:29

910 Views

In this tutorial, we will learn how to get the value of the hreflang attribute of a link in JavaScript. The hreflang is an attribute of a link or anchor tag which specifies the language of the linked document or href attribute. It is used by search engines to understand ... Read More

Advertisements