Use the jquery traversal function-find (), EQ ()

Source: Internet
Author: User
Use the jquery traversal function-find (), EQ ()
I. Background
Gets the value of a column when traversing the table.

ii. Examples and explanations
1) The main framework of HTML is as follows:
    <div class= "Box-body" >
            <table id= "table1" class= "table table-bordered table-striped" >
                <thead >
                <tr id= "Method_title" >
                    <th rowspan= "2" > Display order </th>
                    <th rowspan= "2" > Name </ th>
                    <th rowspan= "2" > Sequential settings </th>
                    <th rowspan= "2" > Actions </th>
                </tr>

                </thead>
                <tbody id= "Table_body" ></tbody>
            </table>
            <div id= "Result" > </div>

    </div>


2) The effect diagram is shown as follows:

3) Gets the button value for the third row, fourth column. The code is as follows:
    $ ("#table1"). Find ("tr"). EQ (2). FIND ("TD"). EQ (3). text ();//The result is the value of ID label3 button.


Iii. references
1) JQuery traversal-Find () method http://www.w3school.com.cn/jquery/traversing_find.asp 2) jQuery Traversal-eq () method http://www.w3school.com.cn/jquery/traversing_eq.asp



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.