By Frankcheck In javascript / jQuery June 2, 2021 0 if url contains string with JQuery if (window.location.href.indexOf("your-string") > -1) { alert("Action"); } 123 if (window.location.href.indexOf("your-string") > -1) { alert("Action");}