Found 9053 Articles for Front End Technology

How to create JavaScript data grid for millions of rows?

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

192 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

1K+ 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

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 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

432 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

305 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

806 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

How to print content of JavaScript object?

Shubham Vora
Updated on 15-Sep-2022 12:31:06

3K+ Views

In this tutorial, we will learn to print the content of a JavaScript object. Objects are similar to variables, but they can contain many values. Javascript object values are written as key: value pairs, and each pair is separated by commas. It is used to access data from databases or any other sources. Following are the ways to print the content of JavaScript objects − Using the JSON.stringify() Method And using a for-in loop Using Object.values() Using the JSON.stringify() Method The JSON.stringify() is used to convert JavaScript Objects into a string. We have to use JSON.stringify() to send ... Read More

How to format a float in JavaScript?

Kumar Ishan
Updated on 05-Sep-2022 06:45:21

4K+ Views

In this tutorial, we will see how to format a floating point number to the desired format using JavaScript. Formatting a floating number means rounding the number up to a given decimal place. We will discuss in detail the various methods listed below− Math.round() Method Math.floor() Method Math.ceil() Method toFixed() Method toPrecision() Method Math.round() method The Math.round() method rounds a number to the nearest integer. We can use this method to format to the nearest integer and also with some decimals. To round with decimals, multiply the number by 10 power of the decimals and then round the ... Read More

Advertisements