Given a DOM element, how do you change its value?
Change the value of the innerText
property:
element.innerText = 'x'
To lookup the element, combine it with the Selectors API:
document.querySelector('#today .total')
Published Oct 23 2018
Given a DOM element, how do you change its value?
Change the value of the innerText
property:
element.innerText = 'x'
To lookup the element, combine it with the Selectors API:
document.querySelector('#today .total')