Learn AspNet Learn AspNet - 3 months ago 7
Javascript Question

How to get part of string using javascript?

I have an array with one element

ClickMeArray[0] = "ClickMe=a-6,a-7,a-8,a-9,"


I want variable to return elements after
ClickMe=
from
ClickMeArray
.

Output should be
a-6,a-7,a-8,a-9,
.

Answer
ClickMeArray[0].split('ClickMe=')[1];
Comments