Copyright 2025

The Valley of Code

A Flavio Copes project

How to change a DOM node value
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')

Join my AI Workshop !

The Web Development BOOTCAMP cohort starts in February 2026