javascript split() method

by Ramya 2009-09-29 12:11:26

Javascript split() method:
Javascript split() method is used to spilt a string into an individual element and stores in an array.

<script type="text/javascript">
var str="29-09-2009";
var spl = str.split("-");
var ff = spl[0];
document.write(ff);
</script>


Result:
29

Tagged in:

1383
like
0
dislike
0
mail
flag

You must LOGIN to add comments