$("#idLog").click(function(){
  var user=document.getElementById('username').value;
  var pass=document.getElementById('password').value;
  var cod=document.getElementById('codigcap').value;
  console.log(cod);
  //alert(cod);
  $.ajax({
    url: "session/login.php",
    type: "POST",
    data: "usuarios="+user+"&contrasenia="+pass+"&codigo="+cod,
    success: function(resp){
      $('#msgLoginREsp').html(resp)
      console.log(resp);
    }   
  });
});