This is my code:
function text(var text)
{
var Value = document.getElementById("display").innerHTML;
var New = Value + text;
document.getElementById("display").innerHTML=New;
}
What it's supposed to do is get a string from when it's called, and then add that string to the end of a div element with the ID "display". I called it like this: text("hello");
The HTML of the webpage is a blank div element, and it stays blank even after the code is run. It worked when I did document.getElementById("display").innerHTML="hello!";, but isn't now. Thanks!