Getting of element by id in JavaScript

Given the element #elem:

<div id="elem"></div>

Get this element using the getElementById method and set some text to it.

enru