Get the value of a tag in jQuery

As the title, a group of the same action a tag, the difference is that the content of the a tag is the search content. Click on the page to display different data

At first, I tried to add the value and id value in the a tag, but the result failed to get the value in jQuery!

Later, I found that it is not so complicated at all, you can directly get the html() content or text content text() of the a tag

/** 
* Click the latest and best-selling point card list to display point card information
*/
$(".rankings").click(function () {
var info=$(this).html();
num=1;/ /This does not conflict with the page number
getPage(0,num,info);
});

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325055924&siteId=291194637