User Tools

Site Tools


jsajax:modifying_elements_with_getelementsbytagname

Accès à des groupes d'éléments avec getElementsByTagName

var a_modifier = document.getElementsByTagName('li'); // Array-like Object
a_modifier[2].innerHTML = requete_AJAX.responseText;

for (var i = 0; i < a_modifier.length; i++) {
  a_modifier[i].innerHTML = requete_AJAX.responseText;

document.getElementsByTagName('li')[3].innerHTML = requete_AJAX.responseText;
jsajax/modifying_elements_with_getelementsbytagname.txt · Last modified: 2016/03/17 12:00 by leo