How to change the DOM node value

Given a DOM element, how to change its value?

Change valueinnerTextproperty:

element.innerText = 'x'

To find the element, match it withSelector API:

document.querySelector('#today .total')

Download mine for freeJavaScript beginner's manual


More browser tutorials: