I have a string variable having data
4096;jpg,bmp
or
2048;flv,mpg
I want to split this string into two string in jquery on the basis of ;
I have a string variable having data
4096;jpg,bmp
or
2048;flv,mpg
I want to split this string into two string in jquery on the basis of ;
You can use JavaScript's split function.
var some_text = "blah;blah;blahness";
var arr = some_text.split(';');
alert(arr[2]); //blahness