JS - if URL contains of this string

0 votes
143 views
added Mar 11, 2022 in Javascript by lcjr First Warrant Officer (11,890 points)
if (window.location.href.indexOf("1581109") > -1) {
  alert("your url contains this 1581109");
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...