Prabhdeep Singh has Published 197 Articles

How to select multiple options in a dropdown list with JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 08:14:24

10K+ Views

In this tutorial, we are going to learn how to select multiple options in a dropdown list with JavaScript. Basically, we are going to make two buttons, one is a drop-down button in which we provide more than one option, and another is a normal button connected to the multiFunc() ... Read More

How to secure my JavaScript using "Strict mode"?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 08:07:42

160 Views

In this tutorial, we are going to learn how to secure my JavaScript using “Strict mode”. There are some errors in the code which are just ignored by the JavaScript engine and if any line fails it perform nothing, to indicate that there is an error we can use the ... Read More

How to return the protocol (http or https) of the web page with JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 08:02:14

720 Views

In this tutorial, we will look at how to find which protocol is being used by a web page. A web page mostly uses http or https protocol. A protocol is a type of standard which is used to specify, how the data is transferred or transmitted between different sets ... Read More

How to round up a number in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:57:31

716 Views

In this tutorial, we will discuss how to round up a number in JavaScript. There is a property in JavaScript under ‘Math’ named “ceil” with the help of this property we can easily round up a number in JavaScript. Ceil() is a mathematical function that computes an integer x to ... Read More

How to return which part of a positioned element is visible in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:51:59

121 Views

This tutorial teaches us how to return which part of a positioned element is visible in JavaScript. Positioned element is an element in JavaScript or Html which have some defined position it could be absolute which means fixed, or any relative position. To make the defined part visible only we ... Read More

How to return the background color of an element with JavaScript DOM?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:40:37

3K+ Views

In this tutorial, we will explore the method by which we can get the background color of an element with JavaScript. There are many scenarios where we may want to get the color of an element on the page, and we will see how to achieve that easily using inbuilt ... Read More

How to return the position of the element relative to floating objects in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:32:28

339 Views

This tutorial teaches us how to return the position of the element relative to floating objects in JavaScript. To set the relative position or to get or return the relative position we are going to use the ‘clear’ property of JavaScript which is defined under the style property of an ... Read More

How to return the color of the text with JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:20:35

3K+ Views

In this tutorial, we will learn how to return the color of the text with JavaScript. In the Style (It is a rule of HTML, used to describe how a document will be presented in the browser.) we define the color under that rule of HTML. To return the color ... Read More

How to return pixel depth of the screen in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:15:10

307 Views

In this tutorial, we will discuss how we can return the pixel depth of the screen in JavaScript. There is a property in JavaScript name pixel depth with the help of this property we can quickly return the pixel depth of the screen’s color. This pixel depth property returns the ... Read More

How to return a number of bits used to display one color on a window screen in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:57:03

127 Views

In this tutorial, we will explore how we can find out the number of bits that are used to display a single color on the screen of our device using JavaScript. JavaScript has many inbuilt functions that allow us to get information about the various properties of the display screen. ... Read More

Advertisements