javascript split() method
by Ramya[ Edit ] 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