const frm = document.getElementById("frmPermisos");
document.addEventListener('DOMContentLoaded', function () {
    frm.addEventListener('submit', function (e) {
        e.preventDefault();
        const http = new XMLHttpRequest();
        const url = base_url + "usuarios/registrarPermisos";
        http.open("POST", url);
        http.send(new FormData(this));
        http.onreadystatechange = function () {
            if (this.readyState == 4 && this.status == 200) {
                const res = JSON.parse(this.responseText);
                alertas(res.msg, res.icono);
            }
        }
    })
})