get button text in javascript code example
Example 1: get button text javascript
document.querySelector("button .button-class").innerText();
Example 2: access text inside a button from js
document.getElementById("myButton2").childNodes[0].nodeValue=
"New Button Text using childNodes";