Home  >  Article  >  Web Front-end  >  What is the usage of formatter in bootstrap?

What is the usage of formatter in bootstrap?

WBOY
WBOYOriginal
2022-02-17 15:30:393797browse

In bootstrap, formatter is a function used to format the data of the current column. The syntax is "formatter(value, row, index)"; the parameters in the syntax respectively represent the values ​​in the current cell. The value of , the current row, and the subscript of the current row.

What is the usage of formatter in bootstrap?

The operating environment of this tutorial: Windows 10 system, bootstrap version 3.3.7, DELL G3 computer

What is the usage of formatter in bootstrap

formatter This attribute belongs to the column parameter, which means to format the data of the current column. It is a function with three parameters, value, row, index,

The syntax is:

formatter(value,row,index)

value: represents the value in the current cell,

row: represents the current row,

index: represents the subscript of the current row,

can be returned using return The data you want is displayed in the cell;

Usage of formatter:

You can directly add function

What is the usage of formatter in bootstrap?

Two ways to write functions (I like this method)

What is the usage of formatter in bootstrap?

Related recommendations: bootstrap tutorial

The above is the detailed content of What is the usage of formatter in bootstrap?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn