I am new to JQuery.
If I have the following tag. What is the best JQuery method to extract the value for "page" from the href.
<a href="Search/Advanced?page=2">2</a>
Malcolm
The first thing that comes to my mind is a one-liner regex:
var pageNum = $("#specificLink").attr("href").match(/page=([0-9]+)/)[1];
1.4m articles
1.4m replys
5 comments
56.9k users