how to get inner text of an element in javascript code example Example: change innertext javascript element.innerText = "Hello World";