Full selection and single function _jquery of jquery implementation table and Ckeckbox

Source: Internet
Author: User
Tags html code example

First of all, we introduce the full selection and Ckeckbox function of the jquery implementation table and the form.

First look at the following effect:

When the user clicks the checkbox for the header, all the table data rows are selected or reversed by the checkbox.

The header checkbox is selected when a row of data rows is not selected. When all the checkbox for all data rows is selected, the checkbox for the header is also selected.

HTML code example, focus on the highlighted section:

jquery code, you can refer to the following:

Ps:js realizes the function of hiding and displaying the ammonium button

When a table has no rows of data, hide the two ammonium buttons below and display them instead, as in the following code example:

jquery Code:

Look at the effect:

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.