传奇sf,传奇私服发布网,新开一秒传奇
当前位置:网站首页 > 传奇私服 > 正文

温馨提示弹出框

作者:admin发布时间:2021-08-06分类:传奇私服浏览:286评论:12


导读:--;-判断执行弹出信息提示框(){[{百度链接地址,},{content:谷歌链接地址,link:http://www.google.com.hk}];varMSG1newCLA...

温馨提示弹出框

--;-判断执行弹出信息提示框(){[{百度链接地址,},{content:谷歌链接地址,link:http://www.google.com.hk}];varMSG1newCLASS_MSN_MESSAGE(msg_div,220,150,消息提醒,您有未录入的数据,msg);MSG1.rect(null,null,null,screen.height-50);MSG1.speed10;MSG1.step5;MSG1.show();}functionopenLink(link){top.document.location.hreflink;}/***消息构造*/functionCLASS_MSN_MESSAGE(id,width,height,caption,title,messageTmp,target,action){this.idid;this.titletitle;this.captioncaption;this.messagemessageTmp;this.targettarget;this.actionaction;this.widthwidth?width:200;this.heightheight?height:120;this.timeout5000;this.speed20;this.step1;this.rightscreen.width-1;this.bottomscreen.height;this.leftthis.right-this.width;this.topthis.bottom-this.height;this.timer0;this.pausefalse;this.closefalse;this.autoHidetrue;}/**隐藏消息方法*/CLASS_MSN_MESSAGE.prototype.hidefunction(){if(this.onunload()){varoffsetthis.heightthis.bottom-this.top?this.height:this.bottom-this.top;varmethis;if(this.timer0){window.clearInterval(me.timer);}varfunfunction(){if(me.pausefalse||me.close){varxme.left;vary0;varwidthme.width;varheight0;if(me.offset0){heightme.offset;}yme.bottom-height;if(yme.bottom){window.clearInterval(me.timer);me.Pop.hide();}else{me.offsetme.offset-me.step;}me.Pop.show(x,y,width,height);}}this.timerwindow.setInterval(fun,this.speed)}}/**消息卸载事件可以重写*/CLASS_MSN_MESSAGE.prototype.onunloadfunction(){returntrue;}/**消息命令事件要实现自己的连接请重写它**/CLASS_MSN_MESSAGE.prototype.oncommandfunction(){//this.closetrue;locationnew.jsp//location../waterAlert/PromptAction.do?actionselectWaitLinkthis.hide();}/**消息显示方法*/CLASS_MSN_MESSAGE.prototype.showfunction(){varoPopupwindow.createPopup();//IE5.5this.PopoPopup;varwthis.width;varhthis.height;varstrDIVstyleBORDER-RIGHT:#4556901pxsolid;BORDER-TOP:#a6b4cf1pxsolid;Z-INDEX:99999;LEFT:0px;BORDER-LEFT:#a6b4cf1pxsolid;WIDTH:wpx;BORDER-BOTTOM:#4556901pxsolid;POSITION:absolute;TOP:0px;HEIGHT:hpx;BACKGROUND-COLOR:#c9d3f3strTABLEstyleBORDER-TOP:#ffffff1pxsolid;BORDER-LEFT:#ffffff1pxsolidcellSpacing0cellPadding0width100%bgColor#cfdef4border0strTRstrTDstyleFONT-SIZE:12px;COLOR:#0f2c8cwidth30height24/TDstrTDstylePADDING-LEFT:4px;FONT-WEIGHT:normal;FONT-SIZE:12px;COLOR:#1f336b;PADDING-TOP:4pxvAligncenterwidth100%this.caption/TDstrTDstylePADDING-RIGHT:2px;PADDING-TOP:2pxvAligncenteralignrightwidth19strSPANtitle关闭styleFONT-WEIGHT:bold;FONT-SIZE:12px;CURSOR:hand;COLOR:red;MARGIN-RIGHT:4pxidbtSysClose×/SPAN/TDstr/TRstrTRstrTDstylePADDING-RIGHT:1px;PADDING-BOTTOM:1pxcolSpan3height(h-28)strDIVstyleBORDER-RIGHT:#b9c9ef1pxsolid;PADDING-RIGHT:8px;BORDER-TOP:#728eb81pxsolid;PADDING-LEFT:8px;FONT-SIZE:12px;PADDING-BOTTOM:8px;BORDER-LEFT:#728eb81pxsolid;WIDTH:100%;COLOR:#1f336b;PADDING-TOP:8px;BORDER-BOTTOM:#b9c9ef1pxsolid;HEIGHT:100%;overflow:autothis.titleBRBRstrDIVstyleWORD-BREAK:break-all;alignleftvartitlefor(vari0;ithis.message.length;i){titlethis.message[i].content;titletitle.length13?title.substring(0,13)...:title;strAhrefjavascript:parent.openLink(\this.message[i].link\hidefocustrueidbtCommandtitlethis.message[i].contentFONTcolor#ff0000title/FONT/Abr/br/}str/DIVstr/DIVstr/TDstr/TRstr/TABLEstr/DIVoPopup.document.body.innerHTMLstr;this.offset0;varmethis;oPopup.document.body.onmouseoverfunction(){me.pausetrue;}oPopup.document.body.onmouseoutfunction(){me.pausefalse;}varfunfunction(){varxme.left;vary0;varwidthme.width;varheightme.height;if(me.offsetme.height){heightme.height;}else{heightme.offset;}yme.bottom-me.offset;if(yme.top){me.timeout--;if(me.timeout0){window.clearInterval(me.timer);if(me.autoHide){me.hide();}}}else{me.offsetme.offsetme.step;}me.Pop.show(x,y,width,height);}this.timerwindow.setInterval(fun,this.speed)varbtCloseoPopup.document.getElementById(btSysClosebtClose.onclickfunction(){me.closetrue;me.hide();}//varbtCommandoPopup.document.getElementById(btCommand//btCommand.onclickfunction(){//me.oncommand();//}}/**//***设置速度方法**/CLASS_MSN_MESSAGE.prototype.speedfunction(s){vart20;try{tpraseInt(s);}catch(e){}this.speedt;}/**//***设置步长方法**/CLASS_MSN_MESSAGE.prototype.stepfunction(s){vart1;try{tpraseInt(s);}catch(e){}this.stept;}CLASS_MSN_MESSAGE.prototype.rectfunction(left,right,top,bottom){try{this.leftleft!null?left:this.right-this.width;this.rightright!null?right:this.leftthis.width;this.bottombottom!null?(bottomscreen.height?screen.height:bottom):screen.height;this.toptop!null?top:this.bottom-this.height;}catch(e){}}//同时两个有闪烁只能用层代替了不过层不跨框架//varMSG2newCLASS_MSN_MESSAGE(aa,200,120,短消息提示,您有2封消息,好的啊//MSG2.rect(100,null,null,screen.height);//MSG1.speed20;//MSG1.step10;//MSG2.show();//--/script/headbodyοnlοadshowMessage();/body/html

 


已有12位网友发表了看法:

欢迎 发表评论: