I have a form and in this I have two INPUTS , these are required so I use the HTML5 REQUIRED property but it only works if I put a BUTTON strong> and this makes my page recharge when doing submit but I do not send it directly but I use Ajax , and then I want to validate them for that I used:
<form>
<input type="text" id="dato1" required>
<input type="text" id="dato2" required>
<input type="button" id="boton" value="enviar" onclick="mifuncion()">
</form>
but this does not validate the form with HTML5 using REQUIRED if I use BUTTON the page is reloaded and I lose the information loaded with AJAX
<button onclick="mifuncion()">Enviar </button>
What I want to achieve is the validation that I have the BUTTON but that I do not recharge the page