首页 > 代码库 > JS关闭当前窗口

JS关闭当前窗口

function logOut() {    $(‘#logging-out‘).on(‘click‘, function () {        stopPreventDefault();        $.messager.confirm(‘安全提示‘, ‘是否退出系统?‘, function (r) {            if (r) {                window.opener = null; window.open(‘‘, ‘_self‘); window.close();                //window.location = $(‘#logging-out‘).attr(‘href‘);            }         });    });}