Javascript-about the data obtained by ajax

Source: Internet
Author: User
The token corresponds to li and obtains the corresponding data ???

There are ul in a.html, and now there are three li in ul. I click a li to get the corresponding data through ajax,
Then there are three a Tags in B .html. how can I find that the tag in B .html is jumped to the corresponding li tag in a.html and the corresponding data is obtained ???

Reply content:

There are ul in a.html, and now there are three li in ul. I click a li to get the corresponding data through ajax,
Then there are three a Tags in B .html. how can I find that the tag in B .html is jumped to the corresponding li tag in a.html and the corresponding data is obtained ???

The following is a pseudo-code for your reference only.

B .html

Jump to LI_A and get data

A.html

  • Li_a
  • Li_ B
  • Li_c
  • $ ('. Myli '). click (function () {loadData ($ (this ). index () ;}); // enter the page to judge the parameters, and then click the corresponding LI tag window. onload = function () {var index = getQuery ('Lil') $ ('. myli '). get (index ). click ();}

    In this demo, you can see: front-end:    
                  

    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.