document.getElementById('someSpan').onmouseover = function() { this.className='newactive'; };
<div id="foo" onmouseover="doSmth()">