js框架页弹出页面关闭

<!-- lang: js -->
function to(href) {
    if (top.location == self.location) {
        //window.opener = null;
        window.opener.location.reload();
        window.open('', '_self');
        window.close();
    } else {
        window.location.href = href;
    }
}

你可能感兴趣的:(js框架页弹出页面关闭)