function greet(name) { elm = document.getElementById('text'); elm.innerText = "Hello, " + name + "!"; }