I need to change the font weight for a text element in JavaScript:
My code does not work here:
var btn = document.getElementById('accessibilityButton');
btn.innerHTML = 'Default Text';
btn.innerHTML.style.fontWeight = 'bold';
What am I doing wrong?
Please note that I do not want to use any libraries (jQuery et al.), And I am looking for a simple JS solution.
source
share