js set data attribute number code example Example: javascript change data attribute value element.dataset.keyName = 'newValue';