Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Form with array like structure
- From: stevec at topdogstrategy.com (Steve Clason)
- Subject: [Javascript] Form with array like structure
- Date: Sun Jul 23 17:42:30 2006
Peter Lauri wrote:
> Yes that helps, I can see that I have 14 elements and that is correct.
> However, I have not been able to loop thru them? How do I do that? I tried
> the following:
>
> var inputelements = document.getElementsByTagName("input");
>
> for(var i=0, len=inputelements.length; i<len; i++) {
> document.write(inputelements[i].value+"<br>");
> }
>
> But that did not work :/
Try:
var inputelements = document.getElementsByTagName("input");
for(var i=0, i<inputelements.length; i++) {
document.write(inputelements[i].value+"<br>");
}
--
Steve Clason
Web Design & Development
Boulder, Colorado, USA
www.topdogstrategy.com
(303)818-8590
- Follow-Ups:
- [Javascript] Form with array like structure
- From: Matt Warden
- [Javascript] Form with array like structure
- References:
- [Javascript] Form with array like structure
- From: Peter Lauri
- [Javascript] Form with array like structure
- Prev by Date: [Javascript] Form with array like structure
- Next by Date: [Javascript] Form with array like structure
- Previous by thread: [Javascript] Form with array like structure
- Next by thread: [Javascript] Form with array like structure
- Index(es):