How do I add a statement in javascript based on the current url?
<p>Basically I want to check what url the user is on and compare it to a default value and then run a statement </p>

<p>Let's say my url is <a href="http://stackoverflow.com/questions/ask">http://stackoverflow.com/questions/ask</a>, I'm trying to do this, and it's not working:</p>

<pre><code>&lt;script type="text/javascript"&gt;
      if(document.location.href('/questions/ask') &gt; 0)
  {
    [do this];
  }
</code></pre>

<p>Thanks for the help(noob question I know)</p>
