Found 8894 Articles for Front End Technology

How to set the style of the left border with JavaScript?

Shubham Vora
Updated on 22-Nov-2022 07:33:53

198 Views

In this tutorial, we shall learn how to set the style of the left border with JavaScript. To set the style of the left border in JavaScript, use the borderLeftStyle property. Set the style under this property that you want for the border i.e. solid, dashed, etc. Let us discuss our topic in brief. Using the borderLeftStyl Property With this property, we can set or return the style of the left border of an element. Users can follow the syntax below for using this property. Syntax object.style.borderLeftStyle = style; This syntax allows the required border style to be ... Read More

How and why does 'z'['toUpperCase']() in JavaScript work?

Shubham Vora
Updated on 22-Aug-2022 09:04:13

169 Views

In this tutorial, we will learn how and why ‘z’[‘toUpperCase’]() works in JavaScript. From the given format, we can say that it calls the toUpperCase() method for the ‘z’ string. It will work the same as the toUpperCase() method, which we invoke by taking any string as a reference. Let’s understand the syntax of the ‘z’[‘toUpperCase’]() below. Syntax let result = 'z'['toUpperCase'](); // returns 'Z', string in upper case The above syntax is same as the below. Example let string = 'z'; let result = string.toUpperCase(); Why does ‘z’[‘toUpperCase’]() work? In JavaScript toUpperCase() method is used to convert ... Read More

How to create JavaScript data grid for millions of rows?

Nancy Den
Updated on 23-Jun-2020 11:51:58

209 Views

To display million of rows of data to the users in a grid, use any of the following grids −S. NoGridDescription1DataTablesAllows adding advanced interaction controls to any HTML table.2IngridAllows resizing columns, paging, sorting, row and column styling to tables.3SlickGridUses virtual rendering to allow you to work with hundreds of thousands of items.Let us see the features of SlickGrid −Easily customizableComplete keyboard navigationEasily handles hundreds of thousands of rowsQuick rendering speedColumn autosizing availablePluggable cell formatters availableAllos creating new rows

Is their a JavaScript Equivalent to PHP explode()?

Ankith Reddy
Updated on 23-Jan-2020 07:05:08

2K+ Views

The JavaScript equivalent to PHP explode() is split(). To get the data after the first colon, try to run the following code.Example                    var str = '087000764008:Rank:info:result';          var arr = str.split(":");          document.write(arr[1] + ":" + arr[2]);          

How to hide HTML element with JavaScript?

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

44K+ 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 Using the style.visibility property Generally, we use the hidden attribute to hide a particular element. We can toggle between hiding and showing the element by setting the hidden attribute value to true or false, respectively. In the other two ways, we use the style object of the element. We ... Read More

How to set the color of the left border with JavaScript?

Shubham Vora
Updated on 09-Nov-2022 11:15:46

477 Views

In this tutorial, we will learn how to set the color of the left border with JavaScript. To set the color of the left border in JavaScript, use the borderLeftColor property. Set the color on this property that you want for the border. We could also apply the borderColor property to set the color of the left border. A border is an HTML element's outline. Different sides can be set with different border colors. To set the color of the left border with JavaScript, we have different ways − Using the style.borderLeftColor property Using the style.borderColor property Using ... Read More

How to display HTML element with JavaScript?

Shubham Vora
Updated on 31-Oct-2022 07:18:48

5K+ Views

In this tutorial, we will learn how to display an HTML element using JavaScript. HTML elements are the components that make up an HTML format file. These components are in charge of constructing web pages and defining their content. In HTML, an element typically consists of a start tag (tag name), a closing tag (tag name), and any text that is added in between. A collection of end tags, start tags, content, and attributes is what constitutes an element technically. Some HTML elements are − Starting Tag Content Ending Tag This is a paragraph. ... Read More

How to define global variable in a JavaScript function?

Sravani S
Updated on 23-Jun-2020 11:56:54

321 Views

To declare a global variable, use the var at global scope −    var myGlobalVariable;    function display() {       //    } For JavaScript function, assign the property to a window −    function display() {       window. myGlobalVariable = …;    }

How to set the image to be used as a border with JavaScript?

Shubham Vora
Updated on 11-Nov-2022 13:25:15

884 Views

In this tutorial, we will learn how to set the image to be used as a border with JavaScript. The outline of an HTML element is called the border. The ‘border-image’ CSS property is used to set an image as the border around an element. It is a shorthand property for: border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat. To set the image to be used as a border with JavaScript we have different ways − Using the style.borderImage Property Using the style.setProperty Method Using the style.borderImage Property An element's style.borderImage property specifies an image that will be used for the ... Read More

How to replace all dots in a string using JavaScript?

Prabhdeep Singh
Updated on 07-Nov-2022 06:11:14

4K+ Views

In this tutorial, we will explore the different ways by which we can replace all dots in a string using JavaScript. It is possible to remove all occurrences of dots in a string manually by running a for loop, but JavaScript provides many functions by which we can accomplish the same task very easily. This is precisely what we will discuss in this article. The two most popular methods by which we can replace all dots in a string using JavaScript are − Using the replaceAll() method in JavaScript JavaScript strings have a method called replaceAll(), to which we can ... Read More

Advertisements