Javascript Question

novon

Diamond Member
Oct 9, 1999
3,711
0
0
Hi,

If I have a string in Javascript, how do I parse part of it out?

The string is: "distribution_dvd"

and all I want is the "distribution" part. I know in VB, you can go like:

Left(String,12) or something, how is it done in Javascript?

Thanks!
 

Rickr

Senior member
Oct 21, 1999
339
0
0
Try this:

checkString = "distribution_dvd";
newString = checkString.substring(0,11);