SyntaxFix
Write A Post
Hire A Developer
Questions
You can simply use:
document.getElementById(button_id).innerText = 'Your text here';
If you want to use HTML formatting, use the innerHTML property instead.
innerHTML