xxxxxxxxxx
<input id="input" type="text">
<button onclick="handleInput()">Submit</button>
<script>
let inputText = document.querySelector("#input");
let button = document.querySelector('button');
let handleInput = () => {
button.innerHTML = inputText.value;
}
</script>