|
|
javascript split() method - Javascript
|
Views : 535
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
By Ramya, On - 2009-09-29 |
|
|
|