title: Add two eventlisteners to two submit buttons in one form
body: <p>I have one form with 2 submit buttons, and for each one I want to add a different event listener on click, and perform a different action for each one. But the second one is not working, the function does not fire. I am new on JS so any help will be welcome. Thanks in advance.
  My code is:
  HTML</p>
  <pre><code>&lt;form id=&quot;searching&quot; action=&quot;javascript:void(0);&quot;&gt;
                &lt;input class=&quot;form-class w-50&quot; type=&quot;text&quot; id=&quot;search&quot; placeholder=&quot;Input your search keyword&quot; name=&quot;search&quot;&gt;
                &lt;br&gt;&lt;br&gt;
                &lt;input type=&quot;submit&quot; class=&quot;btn btn-warning&quot; id=&quot;submit&quot; value=&quot;Weather&quot; name=&quot;weather&quot;&gt;
                &lt;input type=&quot;submit&quot; class=&quot;btn btn-warning&quot; id=&quot;submit2&quot; value=&quot;Forecast!&quot; name=&quot;forecast&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p>JS</p>
  <pre><code>const submit = document.getElementById('submit');
  submit.addEventListener('click', event.getSearch.bind(this,'search'));
  
  const submit2 = document.getElementById('submit2');
  submit2.addEventListener('click', event.getForecast.bind(this));
  </code></pre>