title: how to get url value after question mark in javascript
body: <p>How can I get the url value after a question mark in javascript?</p>
  
  <p>I want the following behaviour:</p>
  
  <pre><code>if value is yes then 10+2 
  else if value is no then 10.
  </code></pre>
  
  <p>I want to output with alert messages.</p>
  
  <pre><code>&lt;div class="col-xs-4 col-sm-4 col-md-4 text-center width100"&gt;
      &lt;a href="piccal.html" class="btn btn-success" id="yes"&gt;PIC Grant Calculator&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="col-xs-4 col-sm-4 col-md-4 text-center width100"&gt;
      &lt;a href="piccal.html" class="btn btn-danger" id="no"&gt;PIC Grant Calculator&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;script&gt; 
  if (value == no) {
      alert('hello');
  }
  &lt;/script&gt;
  
  &lt;script&gt; 
  if (value == yes) {
      alert('hi');
  }
  &lt;/script&gt;
  </code></pre>