check if URL contains some text (javascript)
<p>how can i use javascript/jQuery to check if a URL contains a specific link/text.</p>

<p>for example :<br>
A user browse to my site and his URL is : "http//www.mywebsite.com/userprofile/abc&amp;from=home"<br><br>
I have set a variable and its value is "http//www.mywebsite.com/userprofile/abc" , i want to know how to detect <strong>if</strong> "http//www.mywebsite.com/userprofile/abc" <strong>exist in the URL</strong>("http//www.mywebsite.com/userprofile/abc&amp;from=home") then execute a function.</p>

<p>Thanks!</p>
