get button text content js 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").innnerHTML=
"New Button Text using innerHTML";