Bootstrap table, bootstraptable

Source: Internet
Author: User

Bootstrap table, bootstraptable

Bootstrap Table is a lightweight Table plug-in based on Bootstrap. It supports fixed headers, single check, sorting, paging, search, and custom headers with simple configuration.

1. Required databases:

Bootstrap.min.css

Bootstrap-table.css

Jquery. min. js

Bootstrap. min. js

Bootstrap-table.js

2. Bootstrap Table:

Bootstrap Table displays Table data through data attribute labels or JavaScript:

(1) data attribute label

Set data-toggle = "table" in the Table. You can enable Bootstrap table without writing JavaScript.

<table data-toggle="table" data-url="data.json">  <thead>    ...  </thead></table>

(2) transfer data to the table through ccipt:

<Table id = "table"> </table> <1>. simple static data $ ('# table '). bootstrapTable ({columns: [{field: 'id', title: 'item id'}, {field: 'username', title: 'item username'}, {field: 'Password', title: 'item Passowrd '}], data: [{id: 1, username: 'item 1', passowrd:' $ 1'}, {id: 2, username: 'item 2', password: '$ 2'}]}); <2>. Get data through url $ (' # table '). bootstrapTable ({url: 'data1. json', columns: [{field: 'id', title: 'item id'}, {field: 'username', title: 'item username'}, {field: 'passowrd ', title: 'item passowrd'},]});

3. simple Bootstrap Table demo:

<! Doctype html> 

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

If you want to learn more, click here to learn more. Then, we will attach two wonderful topics: Bootstrap learning tutorial Bootstrap practical tutorial.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.