# How to change a DOM node value

> Learn how to change a DOM node value by setting its innerText property, and how to grab the element first with the Selectors API document.querySelector method.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2018-10-23 | Topics: [Web Platform](https://flaviocopes.com/tags/platform/) | Canonical: https://flaviocopes.com/change-dom-node-value/

Change the value of the `innerText` property:

```js
element.innerText = 'x'
```

To lookup the element, combine it with the [Selectors API](https://flaviocopes.com/selectors-api/):

```js
document.querySelector('#today .total')
```
