innerHTML property of the button.
For instance, if we have the following HTML:
<form> <button name="submit-button">Original<br>Text</button> </form>
We can write:
const form = document.querySelector('form') form.elements["submit-button"].innerHTML = 'submit'
to get the form with
Then we get the button with the
name attribute set to
And we set the
innerHTML property of it to
Therefore, the button in the form would have ‘submit’ as its text content.