Answers for "access text inside a button from js"

2

how to get button text in javascript

To get button text inside its tag name
Posted by: Guest on June-08-2021
0

access text inside a button from js

document.getElementById("myButton2").innnerHTML=
   "New Button Text using innerHTML";
Posted by: Guest on November-30-2020
0

access text inside a button from js

document.getElementById("myButton2").childNodes[0].nodeValue=
   "New Button Text using childNodes";
Posted by: Guest on November-30-2020
0

html get button text

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);  
        }
    }
}
};
Posted by: Guest on August-29-2020

Code answers related to "access text inside a button from js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language