title: Simulate pressing [enter] key on input text
body: <p>My code worked perfectly on changed the value of input automatic on page load with a delay between it. </p>
  
  <p>But there's another problem, When I tried to simulate pressing the <code>[enter]</code> key on the input, it's no working, and it's submit the form and reload my page instead. </p>
  
  <p>How I simulate pressing the <code>[enter]</code> key in the input without submit the form and without reload my page? I am use pure <code>javascript</code> without <code>jQuery</code></p>
  
  <p><strong>This is my script :</strong> </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var form   = document.querySelectorAll("._k3t69");
  var input  = document.querySelectorAll("._7uiwk._qy55y");
  var message = "Replacement..." ; 
  var maxMsg  = 3 ;
  var delay  = 2.5 * 1000 ; // 2.5 Seconds
  
  var j = 0, k = 0;
  function setValue(){
    if( j == maxMsg || j == input.length) {
     clearInterval(looping)
    } else {
    input[j++].value = message ;
      //And then simulate pressing enter key ON THE INPUT, not sumbit the form
      form[k++].submit();
    }
  }
  
  var looping = setInterval(setValue, delay);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form class="_k3t69"&gt;
      &lt;input type="text" class="_7uiwk _qy55y"&gt;
  &lt;/form&gt;
  
  &lt;form class="_k3t69"&gt;
      &lt;input type="text" class="_7uiwk _qy55y"&gt;
  &lt;/form&gt;
  
  &lt;form class="_k3t69"&gt;
      &lt;input type="text" class="_7uiwk _qy55y"&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong><a href="https://jsfiddle.net/k8yjbus2/3/" rel="noreferrer">Here's the fiddle</a></strong></p>