This is a discussion on JavaScript to split the string and store it in a Array? within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi, How to split the string and store it in an Array?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, we can use the following script to do this. <script type="text/javascript"> function validate() { var str="new,star,rose,red,green,blue,yellow,Black,whi te"; var str1=new Array(); str1=str.split(","); var i; for(i in str1) { document.write(str1[i]); document.write("<br>"); } } </script> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| filter element in Javascript array | Jeyaseelansarc | HTML, CSS and Javascript Coding Techniques | 4 | 02-11-2008 06:25 AM |
| Compare a string with String Array. | oxygen | C# Programming | 5 | 12-28-2007 10:18 PM |
| How to pass array of string from vc++ dll to C# ? | kingmaker | C and C++ Programming | 2 | 08-10-2007 04:35 AM |
| How to split a string by using a string usually in the c# dotnet... | Archer | C# Programming | 1 | 07-25-2007 02:26 AM |
| How would you replace a char in string and how do you store the number of replacement | vadivelanvaidyanathan | Perl | 1 | 07-17-2007 03:34 AM |