“Dostęp do tekstu wewnątrz przycisku od JS” Kod odpowiedzi

Dostęp do tekstu wewnątrz przycisku od JS

document.getElementById("myButton2").innnerHTML=
   "New Button Text using innerHTML";
Tall mouse

Dostęp do tekstu wewnątrz przycisku od JS

document.getElementById("myButton2").childNodes[0].nodeValue=
   "New Button Text using childNodes";
Tall mouse

HTML GET TEKTUKA

ar all = document.getElementsByTagName('*'); 
for (var i=0, max=all.length; i < max; i++) 
{
var elem = all[i];
if(elem.getAttribute("id") == 'ext-gen26'){
    if(elem.attributes != null){
        for (var x = 0; x < elem.attributes.length; x++) {
            var attrib = elem.attributes[x];
            alert(attrib.name + " = " + attrib.value);  
        }
    }
}
};
Dangerous Dragonfly

Odpowiedzi podobne do “Dostęp do tekstu wewnątrz przycisku od JS”

Pytania podobne do “Dostęp do tekstu wewnątrz przycisku od JS”

Więcej pokrewnych odpowiedzi na “Dostęp do tekstu wewnątrz przycisku od JS” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu