Thread: String to array
View Single Post
  #1 (permalink)  
Old June 23rd, 2006, 09:46 AM
ajit ajit is offline
Authorized User
 
Join Date: Jun 2006
Location: BANGALORE, Karnatak, India.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ajit
Default String to array

I have stored a string value from text box in a var variable.
Now i want to split the string to an array, and want check for each element in that. split method could not work, because there is no delimeter. It is just a word. Example code is,
Code:
var str = document.getElementById("txtName").value;
if str stores "test", i want to store that in an array as 't','e','s','t'
can anybody help me

Ajit
__________________
Ajit
Reply With Quote