This depends on the type of element, if you want a textual representation of the HTML within the element, use innerHTML
document.getElementById("id").innerHTML
If you only want the text within the element and its descendants use textContent
document.getElementById("id").textContent
Finally if you're working with <input> elements you could use value
document.getElementById("id").value