I want to find out, how can i see if there's any character/string after a specific string part from a string. My question sounds ambiguous but here's my real example:
I can have 2 urls :
I want to put a condition in HTML regarding the url, to have specific header on my site.
How can i check if the url has a itemId or not?
At moment i'm getting only :
location.indexOf('classAdd?itemId=') == -1
check if this
window.location.href.substring(window.location.href.indexOf('classAdd?itemId=') + 16)
gives you the itemId