|
-
Dec 25th, 2005, 08:24 PM
#1
Thread Starter
Hyperactive Member
Element Arrays...
Is it possible to have element arrays in HTML? Like for instance:
Code:
<span name="test"> </span>
<span name="test"> </span>
<span name="test"> </span>
would create an element array of test[0-2]
Last edited by Disiance; Dec 26th, 2005 at 12:21 PM.
"I don't want to live alone until I'm married" - M.M.R.P
-
Dec 26th, 2005, 02:58 AM
#2
Re: Element Arrays...
No but you could name them test1, test2 etc. and in a loop append the number to "test" to refer to the element.
-
Dec 26th, 2005, 12:20 PM
#3
Thread Starter
Hyperactive Member
Re: Element Arrays...
Could that be referenced dynamically in JavaScript? I.e.
Code:
document."test"+ii.value = "...";
"I don't want to live alone until I'm married" - M.M.R.P
-
Dec 26th, 2005, 12:20 PM
#4
Thread Starter
Hyperactive Member
Re: Element Arrays...
Oh duh...nvm... I could set the ID property and reference it with getElementById("test"+ii);
duh, thank you.
"I don't want to live alone until I'm married" - M.M.R.P
-
Dec 26th, 2005, 12:21 PM
#5
Re: Element Arrays...
Yup
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|