Get current url using javascript, and see if string exists
<p>I need a reliable way to get the current URL in the browser using javascript, and to test whether a string is contained in the url.</p>

<p>Is this a safe process between all the browsers?</p>
