Posted By

amandalaine on 07/21/11


Tagged

search String in


Versions (?)

Search in String - return yes or no


 / Published in: JavaScript
 

  1. var url = (window).location.toString()
  2.  
  3. url.indexOf("nomobile")!=-1 //"nomobile" is in the string
  4. url.indexOf("nomobile")==-1 //"nomobile" is NOT in the string

Report this snippet  

You need to login to post a comment.