steinchen84
asked on
JavaScript and startsWith()
I need to check if a string starts with the word "page" in the javascript section of a jsp-file. Depending on the number of page the user is browsing, it'll be "page 1", "page 2" and so on. So I need to compare the static part of the string, which is "page".
Do I need to use regular expressions for this?
The method String.startsWith() is not working with javascript, or am I wrong in this point?
Thanks for any help.
Do I need to use regular expressions for this?
The method String.startsWith() is not working with javascript, or am I wrong in this point?
Thanks for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No worries - glad to help.
Glad to be of some assistance. Thanks for the grade & points.
Good luck & have a great day
Good luck & have a great day
ASKER