Find if a string contains a specific query string and return its value
Posted
by
Ahmad Fouad
on Stack Overflow
See other posts from Stack Overflow
or by Ahmad Fouad
Published on 2010-12-26T03:32:59Z
Indexed on
2010/12/26
3:54 UTC
Read the original article
Hit count: 280
JavaScript
|jQuery
Hello,
I have pagination links set-up like this:
http://localhost/?page=2
http://localhost/?page=3
They are wrapped in Anchor links as the HREF attribute. I want to know how can I check first if the HREF attribute for a given ANCHOR contains the query string "page" case sensitive, and if it exists return its number the value after page=
Please give me a straightforward example on this, much appreciated. :)
© Stack Overflow or respective owner