Answers for "get element by button change text"

0

js change button text

<button id="buttonName">Old Text</button>
<script>document.getElementById('buttonName').innerText = 'New Text';</script>
Posted by: Guest on November-01-2020
1

how to change the text in a button on onclick

var btn = document.getElementById("mybtn");
btn.value = 'my value'; // will just add a hidden value
btn.innerHTML = 'my text';
Posted by: Guest on October-21-2020

Code answers related to "get element by button change text"

Browse Popular Code Answers by Language