js change button text

JavaScript
<!DOCTYPE html>
<html>
<body>

<button id="demo" onclick="myFunction()">Click me to change my HTML content (innerHTML).</button>

<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Paragraph changed!";
}
</script>

</body>
</html> 
<button id="buttonName">Old Text</button>
<script>document.getElementById('buttonName').innerText = 'New Text';</script>
Source

Also in JavaScript: