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