免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Js弹出淡入淡出消息框源码 MSN 弹出消息框function MessShow(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:250; this.height = height?height:150; this.timeout = 1000; /消息停留时间 this.speed = 10; /消息速度,越小越快 this.step = 2; /移动步长 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;MessStotype.hide = function() if(this.onunload() var offset = this.heightthis.bottom-this.top?this.height:this.bottom-this.top; var me = this; if(this.timer0) 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.offset0) 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) /消息卸载事件,可以重写MessStotype.onunload = function() return true; / 消息命令事件,要实现自己的连接,请重写它 MessStotype.oncommand = function() window.open(this.action,this.target); this.hide(); / 消息显示方法 MessStotype.show = function() var oPopup = window.createPopup(); /IE5.5+ this.Pop = oPopup; var w = this.width; var h = this.height; var str = str += str += str += str += + this.caption + str += str += str += str += str += str += + this.title + str += + this.message + str += str += str += str += str += 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.offsetme.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(); / 设置速度方法MessStotype.speed = function(s) var t = 10; try t = praseInt(s); catch(e) this.speed = t;/ 设置步长方法MessStotype.step = function(s) var t = 2; try t = praseInt(s); catch(e) this.step = t; MessStotype.rect = function(left,right,top,bottom) try this.left = left?left:0; this.right = right?right:screen.availWidth -1; this.top = top?top:0; this.bottom = bottom?botto
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 健康评估身体评估
- 子宫肌瘤常见症状及护理指南指引
- 电脑项目资产评估
- 成人氧气吸入疗法的运用
- 数学建模 课件05 几何类数学模型
- 中学生营养不良
- 2026 儿童适应能力沙漠生存锻炼课件
- 网球教练就业方向
- 音乐课前节奏训练
- 瘫痪的康复训练
- 重症康复训练课件
- 油烟机吊柜施工方案设计
- GB/T 17456.1-2025球墨铸铁管、管件和附件外表面锌基涂层第1部分:带终饰层的金属锌及锌合金涂层
- 幼儿园中班数学《找规律》课件
- 2025年宁夏中考数学试卷试题真题(含答案详解)
- 城市大道路灯箱变配电设计方案
- 2025年测绘专业事业编面试题及答案
- 非遗标识管理办法
- 疼痛科考试题及答案
- CJ/T 124-2016给水用钢骨架聚乙烯塑料复合管件
- 海报色彩搭配课程设计
评论
0/150
提交评论