js网页右下角提示框实例(2)
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程序设计有所帮助。