Jean-Sébastien a écrit :
Hello,
Is it possible to have a div component, that i repeat several time
on an html page : all those occurences of the div with the same dom
id.
Tout est possible ! Le brouteur ne sera pas géné.
No you can't :
- not allowed by standards
- not usable : how to reach this or that div ?
If you want to copy a div and use this copy, you have to set it a new id
before to insert it
var idx = 0;
function addDiv() {
var d = document.getElementById('template').cloneNode(true );
d.id += '_'+idx;
document.body.appendChild(d);
idx++;
}
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date