Boton en html cambiar texto

<!DOCTYPE html>
<html>
<head>
</head>

<body>

<button type="button" id="botonOn" onclick="FbotonOn()"> on </button>

</body>
</html>

<script>
var valor = true
function FbotonOn() {
  var uno = document.getElementById('botonOn');
  valor?uno.innerText = "off":uno.innerText = "on";
  valor=!valor
}

</script>
Spotless Salmon