网页右侧悬浮窗 初学者

悬浮窗上的关闭
用了点击事件
但是不知道怎么写。
function guanbi(){
window.close();
}

这样写关闭了整个网页。
只关闭悬浮窗 怎么写?


    function guanbi() {
        document.getElementById('浮动层id').style.display='none'
    }

function guanbi(){
window.close();
要关闭的窗口.close
}

悬浮的是div?将这个div隐藏掉

那是隐藏,不是关闭页面。hide();或者fadeOut()等

换种思路,直接把想要的隐藏