How would I write an if statement that alerts when the var MyString is not in the var URL?
var URL = "http://test.mysite.com/about/";
var MyString = "mysite.com";
How would I write an if statement that alerts when the var MyString is not in the var URL?
var URL = "http://test.mysite.com/about/";
var MyString = "mysite.com";
if(URL.indexOf(MyString) == -1) alert("Not found");