[thelist] javascript: for-in loop and split
Tom Dell'Aringa
pixelmech at yahoo.com
Thu Feb 20 14:50:01 CST 2003
I have a date string that I have split based on the slash:
var date = "1/1/2000"
var chkslashpos = date.split('/')
What I wanted to do was then use a for-in loop to grab each number,
but I can't quite get it. I tried:
for(var i in chkslashpos)
{
alert(chkslashpos)
}
Which just gives me the whole thing three times. Isn't there a way to
use this to get 1, 1, and 2000?
Alternately, could I take the split date and populate an array with
it?
TIA
Tom
=====
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.pixelmech.com/
var me = tom.pixelmech.webDeveloper();
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
More information about the thelist
mailing list