- 浏览: 321180 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (178)
- 程序人生 (9)
- 工作总结 (16)
- 我的功能实现 (8)
- J2SE总结 (8)
- 面试中用到的 (10)
- struts2 (15)
- jsp (4)
- js (21)
- 数据库 (7)
- 数据结构和算法 (3)
- jQuery (18)
- hibernate (3)
- web service (2)
- spring (1)
- mySQL (7)
- 服务器 (1)
- 缓存 (2)
- nginx (1)
- jquery.ui (1)
- 各类标签(Date转 string) (1)
- Raphael (3)
- maven (2)
- 大型分布式网站架构设计 (2)
- linux (1)
- java易犯错误 (1)
- 优化 (4)
最新评论
-
15381049808:
楼主写的很赞 我对中间的批量发送拿过来现在还好用 受益匪浅
java实现邮件抄送,密送,多个附件发送 -
猜猜猜:
你这不是选择了语言之后总是跳到同一个页面吗?比如登录页面,选择 ...
struts2国际化——实例 -
itshu:
struts2国际化——实例 -
itshu:
[flash=200,200][url][img][list] ...
struts2国际化——实例 -
ZP0605:
com.asia.home.cn这个包名好熟悉
struts2拦截器管理日志
<HTML><HEAD>
<TITLE>javascript页面右下角弹出类似QQ或MSN的消息提示</TITLE>
<SCRIPT language=JavaScript>
function CLASS_MSN_MESSAGE(id,width,height,caption,title,message,target,action){
this.id = id;
this.title = title;
this.caption= caption;
this.message= message;
this.target = target;
this.action = action;
this.width = width?width:200;
this.height = height?height:120;
this.timeout= 150;
this.speed = 20;
this.step = 1;
this.right = screen.width -1;
this.bottom = screen.height;
this.left = this.right - this.width;
this.top = this.bottom - this.height;
this.timer = 0;
this.pause = false;
this.close = false;
this.autoHide = true;
}
/**//*
* 隐藏消息方法
*/
CLASS_MSN_MESSAGE.prototype.hide = function(){
if(this.onunload()){
var offset = this.height>this.bottom-this.top?this.height:this.bottom-this.top;
var me = this;
if(this.timer>0){
window.clearInterval(me.timer);
}
var fun = function(){
if(me.pause==false||me.close){
var x = me.left;
var y = 0;
var width = me.width;
var height = 0;
if(me.offset>0){
height = me.offset;
}
y = me.bottom - height;
if(y>=me.bottom){
window.clearInterval(me.timer);
me.Pop.hide();
} else {
me.offset = me.offset - me.step;
}
me.Pop.show(x,y,width,height);
}
}
this.timer = window.setInterval(fun,this.speed)
}
}
/**//*
* 消息卸载事件,可以重写
*/
CLASS_MSN_MESSAGE.prototype.onunload = function() {
return true;
}
/**//*
* 消息命令事件,要实现自己的连接,请重写它
*
*/
CLASS_MSN_MESSAGE.prototype.oncommand = function(){
//this.close = true;
this.hide();
window.open("http://www.chinaz.com");
}
/**//*
* 消息显示方法
*/
CLASS_MSN_MESSAGE.prototype.show = function(){
var oPopup = window.createPopup(); //IE5.5+
this.Pop = oPopup;
var w = this.width;
var h = this.height;
var str = "<DIV style='BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: " + w + "px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: " + h + "px; BACKGROUND-COLOR: #c9d3f3'>"
str += "<TABLE style='BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid' cellSpacing=0 cellPadding=0 width='100%' bgColor=#cfdef4 border=0>"
str += "<TR>"
str += "<TD style='FONT-SIZE: 12px;COLOR: #0f2c8c' width=30 height=24></TD>"
str += "<TD style='PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #1f336b; PADDING-TOP: 4px' vAlign=center width='100%'>" + this.caption + "</TD>"
str += "<TD style='PADDING-RIGHT: 2px; PADDING-TOP: 2px' vAlign=center align=right width=19>"
str += "<SPAN title=关闭 style='FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px' id='btSysClose' >×</SPAN></TD>"
str += "</TR>"
str += "<TR>"
str += "<TD style='PADDING-RIGHT: 1px;PADDING-BOTTOM: 1px' colSpan=3 height=" + (h-28) + ">"
str += "<DIV style='BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; PADDING-BOTTOM: 8px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 8px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%'>" + this.title + "<BR><BR>"
str += "<DIV style='WORD-BREAK: break-all' align=left><A href='BLOCKED SCRIPTvoid(0)' hidefocus=false id='btCommand'><FONT color=#ff0000>" + this.message + "</FONT></A>javascript仿QQ右下角消息<A href='http://www.vnde.cn' hidefocus=false id='ommand'><FONT color=#ff0000>javascript仿QQ右下角消息</FONT></A></DIV>"
str += "</DIV>"
str += "</TD>"
str += "</TR>"
str += "</TABLE>"
str += "</DIV>"
oPopup.document.body.innerHTML = str;
this.offset = 0;
var me = this;
oPopup.document.body.onmouseover = function(){me.pause=true;}
oPopup.document.body.onmouseout = function(){me.pause=false;}
var fun = function(){
var x = me.left;
var y = 0;
var width = me.width;
var height = me.height;
if(me.offset>me.height){
height = me.height;
} else {
height = me.offset;
}
y = me.bottom - me.offset;
if(y<=me.top){
me.timeout--;
if(me.timeout==0){
window.clearInterval(me.timer);
if(me.autoHide){
me.hide();
}
}
} else {
me.offset = me.offset + me.step;
}
me.Pop.show(x,y,width,height);
}
this.timer = window.setInterval(fun,this.speed)
var btClose = oPopup.document.getElementById("btSysClose");
btClose.onclick = function(){
me.close = true;
me.hide();
}
var btCommand = oPopup.document.getElementById("btCommand");
btCommand.onclick = function(){
me.oncommand();
}
var ommand = oPopup.document.getElementById("ommand");
ommand.onclick = function(){
//this.close = true;
me.hide();
window.open(ommand.href);
}
}
/**//*
** 设置速度方法
**/
CLASS_MSN_MESSAGE.prototype.speed = function(s){
var t = 20;
try {
t = praseInt(s);
} catch(e){}
this.speed = t;
}
/**//*
** 设置步长方法
**/
CLASS_MSN_MESSAGE.prototype.step = function(s){
var t = 1;
try {
t = praseInt(s);
} catch(e){}
this.step = t;
}
CLASS_MSN_MESSAGE.prototype.rect = function(left,right,top,bottom){
try {
this.left = left !=null?left:this.right-this.width;
this.right = right !=null?right:this.left +this.width;
this.bottom = bottom!=null?(bottom>screen.height?screen.height:bottom):screen.height;
this.top = top !=null?top:this.bottom - this.height;
} catch(e){}
}
var MSG1 = new CLASS_MSN_MESSAGE("aa",200,120,"短消息提示:","您有1封消息","javascript仿QQ右下角消息");
MSG1.rect(null,null,null,screen.height-50);
MSG1.speed = 10;
MSG1.step = 5;
//alert(MSG1.top);
MSG1.show();
//同时两个有闪烁,只能用层代替了,不过层不跨框架
//var MSG2 = new CLASS_MSN_MESSAGE("aa",200,120,"短消息提示:","您有2封消息","好的啊");
// MSG2.rect(100,null,null,screen.height);
// MSG2.show();
//-->
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',10000); //指定10秒刷新一次
</SCRIPT>
<BODY></BODY></HTML>
<TITLE>javascript页面右下角弹出类似QQ或MSN的消息提示</TITLE>
<SCRIPT language=JavaScript>
function CLASS_MSN_MESSAGE(id,width,height,caption,title,message,target,action){
this.id = id;
this.title = title;
this.caption= caption;
this.message= message;
this.target = target;
this.action = action;
this.width = width?width:200;
this.height = height?height:120;
this.timeout= 150;
this.speed = 20;
this.step = 1;
this.right = screen.width -1;
this.bottom = screen.height;
this.left = this.right - this.width;
this.top = this.bottom - this.height;
this.timer = 0;
this.pause = false;
this.close = false;
this.autoHide = true;
}
/**//*
* 隐藏消息方法
*/
CLASS_MSN_MESSAGE.prototype.hide = function(){
if(this.onunload()){
var offset = this.height>this.bottom-this.top?this.height:this.bottom-this.top;
var me = this;
if(this.timer>0){
window.clearInterval(me.timer);
}
var fun = function(){
if(me.pause==false||me.close){
var x = me.left;
var y = 0;
var width = me.width;
var height = 0;
if(me.offset>0){
height = me.offset;
}
y = me.bottom - height;
if(y>=me.bottom){
window.clearInterval(me.timer);
me.Pop.hide();
} else {
me.offset = me.offset - me.step;
}
me.Pop.show(x,y,width,height);
}
}
this.timer = window.setInterval(fun,this.speed)
}
}
/**//*
* 消息卸载事件,可以重写
*/
CLASS_MSN_MESSAGE.prototype.onunload = function() {
return true;
}
/**//*
* 消息命令事件,要实现自己的连接,请重写它
*
*/
CLASS_MSN_MESSAGE.prototype.oncommand = function(){
//this.close = true;
this.hide();
window.open("http://www.chinaz.com");
}
/**//*
* 消息显示方法
*/
CLASS_MSN_MESSAGE.prototype.show = function(){
var oPopup = window.createPopup(); //IE5.5+
this.Pop = oPopup;
var w = this.width;
var h = this.height;
var str = "<DIV style='BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: " + w + "px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: " + h + "px; BACKGROUND-COLOR: #c9d3f3'>"
str += "<TABLE style='BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid' cellSpacing=0 cellPadding=0 width='100%' bgColor=#cfdef4 border=0>"
str += "<TR>"
str += "<TD style='FONT-SIZE: 12px;COLOR: #0f2c8c' width=30 height=24></TD>"
str += "<TD style='PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #1f336b; PADDING-TOP: 4px' vAlign=center width='100%'>" + this.caption + "</TD>"
str += "<TD style='PADDING-RIGHT: 2px; PADDING-TOP: 2px' vAlign=center align=right width=19>"
str += "<SPAN title=关闭 style='FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px' id='btSysClose' >×</SPAN></TD>"
str += "</TR>"
str += "<TR>"
str += "<TD style='PADDING-RIGHT: 1px;PADDING-BOTTOM: 1px' colSpan=3 height=" + (h-28) + ">"
str += "<DIV style='BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; PADDING-BOTTOM: 8px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 8px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%'>" + this.title + "<BR><BR>"
str += "<DIV style='WORD-BREAK: break-all' align=left><A href='BLOCKED SCRIPTvoid(0)' hidefocus=false id='btCommand'><FONT color=#ff0000>" + this.message + "</FONT></A>javascript仿QQ右下角消息<A href='http://www.vnde.cn' hidefocus=false id='ommand'><FONT color=#ff0000>javascript仿QQ右下角消息</FONT></A></DIV>"
str += "</DIV>"
str += "</TD>"
str += "</TR>"
str += "</TABLE>"
str += "</DIV>"
oPopup.document.body.innerHTML = str;
this.offset = 0;
var me = this;
oPopup.document.body.onmouseover = function(){me.pause=true;}
oPopup.document.body.onmouseout = function(){me.pause=false;}
var fun = function(){
var x = me.left;
var y = 0;
var width = me.width;
var height = me.height;
if(me.offset>me.height){
height = me.height;
} else {
height = me.offset;
}
y = me.bottom - me.offset;
if(y<=me.top){
me.timeout--;
if(me.timeout==0){
window.clearInterval(me.timer);
if(me.autoHide){
me.hide();
}
}
} else {
me.offset = me.offset + me.step;
}
me.Pop.show(x,y,width,height);
}
this.timer = window.setInterval(fun,this.speed)
var btClose = oPopup.document.getElementById("btSysClose");
btClose.onclick = function(){
me.close = true;
me.hide();
}
var btCommand = oPopup.document.getElementById("btCommand");
btCommand.onclick = function(){
me.oncommand();
}
var ommand = oPopup.document.getElementById("ommand");
ommand.onclick = function(){
//this.close = true;
me.hide();
window.open(ommand.href);
}
}
/**//*
** 设置速度方法
**/
CLASS_MSN_MESSAGE.prototype.speed = function(s){
var t = 20;
try {
t = praseInt(s);
} catch(e){}
this.speed = t;
}
/**//*
** 设置步长方法
**/
CLASS_MSN_MESSAGE.prototype.step = function(s){
var t = 1;
try {
t = praseInt(s);
} catch(e){}
this.step = t;
}
CLASS_MSN_MESSAGE.prototype.rect = function(left,right,top,bottom){
try {
this.left = left !=null?left:this.right-this.width;
this.right = right !=null?right:this.left +this.width;
this.bottom = bottom!=null?(bottom>screen.height?screen.height:bottom):screen.height;
this.top = top !=null?top:this.bottom - this.height;
} catch(e){}
}
var MSG1 = new CLASS_MSN_MESSAGE("aa",200,120,"短消息提示:","您有1封消息","javascript仿QQ右下角消息");
MSG1.rect(null,null,null,screen.height-50);
MSG1.speed = 10;
MSG1.step = 5;
//alert(MSG1.top);
MSG1.show();
//同时两个有闪烁,只能用层代替了,不过层不跨框架
//var MSG2 = new CLASS_MSN_MESSAGE("aa",200,120,"短消息提示:","您有2封消息","好的啊");
// MSG2.rect(100,null,null,screen.height);
// MSG2.show();
//-->
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',10000); //指定10秒刷新一次
</SCRIPT>
<BODY></BODY></HTML>
发表评论
-
利用jquery1.7的ajax提交form表单很简单
2013-03-12 17:51 1471之前用ajax提醒form表单,要引入一个jquery-for ... -
页内内容查找(类型于ctrl+f)2
2013-01-08 15:39 1185<html> <META HTTP-EQUI ... -
js查询前三个月的时间
2013-01-08 15:17 4883import java.util.Calendar; impo ... -
通过XMLHttpRequest 可以获取的网页的运行状态,从返回状态判断网站是否挂了
2012-11-27 16:42 944通过XMLHttpRequest 可以获取的网页的运行状态,从 ... -
iframe载入完成时的事件监听
2012-11-21 14:35 1105在iframe里嵌入另外一个 ... -
parseInt(08)或者parseInt(09)错误
2012-11-05 09:59 899对于parseInt("01")到par ... -
js打印,打印预览
2012-10-08 09:45 970JS打印预览 2009-04-16 14:10:53 标签:休 ... -
iframe 父窗口和子窗口相互的调用方法集锦
2012-09-24 17:07 849一、父窗口调用iframe子窗口方法 1、HTML语法:& ... -
window.showModalDialog 传大数据(Ojbect对象)到另一个页面
2012-09-21 14:01 9941:onePage.jsp var obj = new ... -
js 处理反斜杆的字符串
2012-08-24 14:58 1148如果有var = "d:\用户数据\zhutongy ... -
拿到iframe中id的值
2012-08-20 09:16 3917</table> </td> ... -
根据IP确定城市
2012-08-17 13:16 1089<script src="http://int ... -
window.showModalDialog非常好用
2012-05-28 15:27 1015例: one.jsp var str = window.sh ... -
js日期总结
2011-12-23 10:15 8811:var thisday = new Date(); 年 ... -
jsp,js跳转方式
2011-07-12 18:30 1643按钮式: <INPUT name="p ... -
js实现 鼠标拖动背景图片
2011-07-12 18:28 1558<html> <head> < ... -
下拉菜单跳转页面
2011-07-12 18:23 1164<script language="j ... -
整数相加
2011-07-12 18:14 1020苹果:<INPUT onpropertychange=c ... -
js常用技术
2011-07-12 18:05 886事件源对象 捕获释放 event.srcElement. ... -
js验证表单
2011-07-12 17:57 8071. 长度限制 <script> functi ...
相关推荐
页面右下角弹出类似MSN的消息提示 网上有代码,里面可以自己修改一下参数,变成自己实用的Js
利用javascript实现右下角弹出提示框。仿QQ
桌面右下角弹出类似QQ的消息提示窗,下载后可以直接使用,根据实际情况传参就行。
javaScript实现网页右下角弹出窗口(模拟qq消息)代码,js 模拟qq消息 右下角弹窗 html广告插件 js广告插件
js实现右下角弹出层,就像qq一样,可以动态的弹出层,但是不能时时刷新
一个类似QQ的用JavaScript实现的在网页右下角弹出窗口源码例子
javascript实现弹消息提示框 像各大邮箱提示有新邮件收到或QQ和MSN提示 页面右下角弹出类似QQ或MSN的消息提示
javascript 右下角弹出层,右下角探出广告窗口的javascript代码
javascript右下角弹消息提示
JavaScript 类似QQ消息的弹出窗口
采用纯JavaScript技术实现,当登录后网页的右下角弹出小型消息框,如csdn右下角的效果......或许对你很有帮助哟......
通过JavaScript技术,点击页面上的标签或是点击按钮实现页面右下角弹出提示框信息,可搭配websocket等通信技术
JS QQ MSN 右下角 广告代码(精简兼容版) 信息提示窗口 基于JavaScript的右下角广告代码 流行的广告形式 当打开网页后显示在网页的右下角,不影响网页的主体内容 可以由用户自行关闭 站点公告或提示也是可以的 不...
用JavaScript在网页右下角弹出窗口
网页右下角弹出通知消息代码notyf插件是一款纯javascript来实现的,没有任何外部依赖,通过简单的设置,即可生成漂亮的消息通知效果。
现在作web开发,常常遇到需要消息提醒功能,我在网上找了一个js右下角弹出提示消息的例子,用还是挺不错的,大家可以试试。
javascript实现右下角提示框,支持最小化,最大化,关闭,消息多条翻页。。。完整可运行!项目中测得通过! 在页面中直接引用该JS即可。用到了jquery.需要引用jquery支持包。 方式: ...
在页面的右下角显示弹出式广告,可自行关闭。本插件基于jquery开发,利用iframe加载,移植性强,脱离底层javascript代码,便于后期广告的更改。 本插件兼容IE6或更高,Firefox,Chrome,Opera等浏览器。 2.如何使用...
仿MSN的右下角提示框,采用javascript编写的类似MSN的离线提示窗口
之前我们介绍过一款外观还不错的jQuery/CSS3内置关闭按钮的...今天要分享的是一款基于JavaScript的信息提示插件Notyf,你可以随时触发信息提示事件,插件可以帮助你在页面右下角弹出信息提示框,并自动关闭,非常实用。