title: how to trigger an onmouseover event on element in javascript?
body: <p>As titled, how do I trigger an <code>onmouseover</code> event on element in javascript? please refer to Code Snippet. Instead of hovering over the big box, can I click on the small black box and execute the <code>onmouseover</code> event? The goal is NOT to turn the box blue but TRIGGER the <code>onmouseover</code> event. And also I need this to be done with only JavaScript, no Jquery please. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function showBlue() {
   document.getElementById('xyz').style.background = "#425dff"; 
  }
  function showRed() {
   document.getElementById('xyz').style.background = "#e2e2e2";
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#abc{width: 50px; height: 50px; background: #000000; color:#ffffff; cursor: pointer;}
  #xyz{width: 200px; height: 200px; background: #e2e2e2;}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="abc"&gt;&lt;a&gt;click me&lt;/a&gt;&lt;/div&gt;
  
  &lt;/br&gt;
  
  &lt;div id="xyz" onmouseover="showBlue()" onmouseout="showGrey()"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried this but did not work for me :( </p>
  
  <pre><code>&lt;script&gt;
      document.getElementById('abc').addEventListener("click", triggerFunction);
  
      function triggerFunction() {
          document.getElementById('xyz').mouseover();
      }
  &lt;/script&gt;
  </code></pre>