title: Javascript, page keeps refreshing
body: <p>I'm trying to do something on submitting the form but when i open the page it keeps refreshing without me submitting or doing anything</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="someForm"&gt;
          &lt;input id="someInput" /&gt;&lt;button&gt;Send&lt;/button&gt;
      &lt;/form&gt;
      &lt;script&gt;        
    document.getElementById('someForm').submit(() =&gt; {
          //do something..
    });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>