<!DOCTYPE html>
<html>
<head>
<title>Pruebas</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<input type="text" name="nombre" id="nombre">
<input type="text" name="apellido" id="apellido">
<input type="text" name="cedula" id="cedula">
<button onclick="GuardarDatos();" id="botonGuardar">Guardar</button>
<script type="text/javascript">
function GuardarDatos(){
var nombre = $("#nombre").val();
var apellido = $("#apellido").val();
var cedula = $("#cedula").val();
var parametros = {
"nombre" : nombre,
"apellido" : apellido,
"cedula" : cedula
};
$.ajax({
data: parametros,
url: 'confirmar.php',
type: 'post',
beforeSend: function () {
$("#botonGuardar").prop("disabled",true);
},
success: function (response) {
$("#botonGuardar").prop("disabled",false);
}
});
}
</script>
</body>
</html>