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_aLi_ BLi_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: