title: prevent button submit form onclick
body: <p>I have a problem on html button tag</p>
  
  <p>This my html code</p>
  
  <pre><code>&lt;form name="data_kirim" action="confirm_order.php" method="POST"&gt;
  
          ..... order input field ....
  
      &lt;button class="back_button" onclick="window.location.href='keranjang.php'"&gt;Back&lt;/button&gt;
      &lt;input class="next_button" type="submit" name="submit_data_kirim" value="Next"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>How to prevent button to submit this form, because button is using the href to back page,</p>
  
  <p>Can someone help me?</p>