title: Javascript: getting element in dom tree when mouseover
body: <p>When using :</p>
  
  <pre><code>document.onmouseover = function(e) {}
  </code></pre>
  
  <p>Is there a property which gives me the element in the dom tree ?</p>
  
  <p>For example, I can set a style to <code>e.srcElement</code>
  But, how can I later access this element to (for example) reset its style ?
  And how can I know at which place in the dom tree it is ?
  I want to be able to situate it in the whole page dump.</p>
  
  <p>Many thanks.</p>
  
  <p>To solve the problem about reaccessing the element later, I tried this but it doesn't work :</p>
  
  <pre><code>var lastelem;
  
  document.onmouseover = function(e) {
  
    if (lastelem != null){
      lastelem.style.border = "0px";
    }
  
    if (e===undefined) e= window.event;
    var target= 'target' in event? event.target : event.srcElement;
    document.getElementById('display').value = target.tagName;
    target.style.border = "1px";
    lastelem = target;
  };
  </code></pre>
  
  <p>Thanks</p>