Is it possible to have element arrays in HTML? Like for instance:
would create an element array of test[0-2]Code:<span name="test"> </span>
<span name="test"> </span>
<span name="test"> </span>
Printable View
Is it possible to have element arrays in HTML? Like for instance:
would create an element array of test[0-2]Code:<span name="test"> </span>
<span name="test"> </span>
<span name="test"> </span>
No but you could name them test1, test2 etc. and in a loop append the number to "test" to refer to the element.
Could that be referenced dynamically in JavaScript? I.e.
Code:document."test"+ii.value = "...";
Oh duh...nvm... I could set the ID property and reference it with getElementById("test"+ii);
duh, thank you.
Yup :p