龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > Javascript编程 >

js网页右下角提示框实例(2)

时间:2014-10-19 15:07来源:网络整理 作者:网络 点击:
分享到:
var divWidth = parseInt(this.eMsg.offsetWidth, 10); var docWidth = document.body.clientWidth; var docHeight = document.body.clientHeight; this.docHeight = docHeight; this.eMsg.style.top = parseInt(doc

        var divWidth = parseInt(this.eMsg.offsetWidth, 10);
        var docWidth = document.body.clientWidth;
        var docHeight = document.body.clientHeight;
        this.docHeight = docHeight;

        this.eMsg.style.top = parseInt(document.body.scrollTop, 10) + docHeight + 10;
        this.eMsg.style.left = parseInt(document.body.scrollLeft, 10) + docWidth - divWidth;
        this.eMsg.style.visibility = "visible";

        var _this = this;
        this.objTimer = window.setInterval(function() { _this.moveDiv(_this); }, 10);
    }
}

var msgTip = new messageTip({ name: 'eMeng' });
window.onload = function() { msgTip.show(); };
window.onresize = function() { msgTip.rePosition(msgTip); };

希望本文所述对大家的web程序设计有所帮助。

精彩图集

赞助商链接