title: Jquery code to split the href link
body: <p>I have an href link as follows.i have to spilt <code>name</code> value and <code>id</code> value separately.</p>
  
  <pre><code>index.html?names=priya@gmail.com&amp;id=68
  </code></pre>
  
  <p>Using jquery how can i split <code>priya@gmail.com</code> and <code>68</code>
  i tried the following one</p>
  
  <p><code>var val =location.href.split('?')[1]</code>
  which outputs the <code>priya@gmail.com&amp;id=68</code></p>
  
  <p>i have to output <code>priya@gmail.com and 68</code> separately..how it is possible..</p>