poner boton dentro de un input code example
Example: 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>