title: Check for user in JavaScript
body: <p>I have this piece of code, which checks the address bar for the string <code>?user=</code>:</p>
  
  <pre><code>if(window.location.href.indexOf("?user=") &gt; -1) {
      start();
  } else {
      alert("No user.");
  }
  </code></pre>
  
  <p>But actually I would like to check, if the <code>?user=</code> has something after it, for example a name. I would be glad if you could help me out.</p>