Search in String - return yes or no

/ Published in: JavaScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. var url = (window).location.toString()
  3. url.indexOf("nomobile")!=-1 //"nomobile" is in the string
  4. url.indexOf("nomobile")==-1 //"nomobile" is NOT in the string

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.