UPDATE
Sorry my qusetion was unclear i have updated my question
I want to add a query string in the end of url using anchor
For example if i have url
www.mysite.com/home
And have anchors on this page
<a href='?page=1'>1</a>
<a href = '?page=2'>2</a>
.
.
<a href = '?page =x'>x</a>
When i click on these anchor link it directs me to Url
www.mysite.com/home?page=x
That what i want , I just want to add query string page
in the end of the url,
But in the case of
www.mysite.com/home?category=sports
Or
www.mysite.com/home?category=music
Then if i click on the same anchor link
It redirects me to
www.mysite.com/home?page=x
But i want it to direct me to
www.mysite.com/home?category=sports&page=x
And now if i again on any of those link like
<a href='?page=1'>1</a>
Then i want it to direct me to
www.mysite.com/home?category=sports&page=1
is their any simple solution to do this , Or i have to use any complex javascript code.
thanks