phpcms模仿QQ和MSN消息提示的效果
1970-01-01 来源:
关键字描述:提示 效果 消息 模仿 " popTop if else & screen.width-2
你一定很喜欢像QQ或者MSN好友登录提示的效果吧,那么怎么样能在网页中实现呢?正好我在蓝色理想中发现了这段代码,贴出给大家看看(注意,如果使用以下代码,先将全角“<>”替换成半角的“<>”才能正常使用):
<SCRIPT>
var oPopup = window.createPopup();
var popTop=50;
function popmsg(msgstr){
varwinstr="<table style=\"border: 1 solid #FFA6CA\" width=\"241\"height=\"172\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"" >";
winstr ="<tr><td height=\"30\"> </td></tr><tr><tdalign=\"center\"><table width=\"90%\" height=\"110\" border=\"0\"cellpadding=\"0\" cellspacing=\"0\">";
winstr ="<tr><tdvalign=\"top\" style=\"font-size:12px; color: red; face: Tahoma\">"msgstr "</td></tr></table></td></tr></table>";
oPopup.document.body.innerHTML = winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720){
clearTimeout(mytime);
oPopup.hide();
return;
}else if(popTop>1520&&popTop<1720){
oPopup.show(screen.width-250,screen.height,241,1720-popTop);
}else if(popTop>1500&&popTop<1520){
oPopup.show(screen.width-250,screen.height (popTop-1720),241,172);
}else if(popTop<180){
oPopup.show(screen.width-250,screen.height,241,popTop);
}else if(popTop<220){
oPopup.show(screen.width-250,screen.height-popTop,241,172);
}
popTop =10;
var mytime=setTimeout("popshow();",50);
}
</SCRIPT>
你一定很喜欢像QQ或者MSN好友登录提示的效果吧,那么怎么样能在网页中实现呢?正好我在蓝色理想中发现了这段代码,贴出给大家看看(注意,如果使用以下代码,先将全角“<>”替换成半角的“<>”才能正常使用):
<SCRIPT>
var oPopup = window.createPopup();
var popTop=50;
function popmsg(msgstr){
varwinstr="<table style=\"border: 1 solid #FFA6CA\" width=\"241\"height=\"172\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"" >";
winstr ="<tr><td height=\"30\"> </td></tr><tr><tdalign=\"center\"><table width=\"90%\" height=\"110\" border=\"0\"cellpadding=\"0\" cellspacing=\"0\">";
winstr ="<tr><tdvalign=\"top\" style=\"font-size:12px; color: red; face: Tahoma\">"msgstr "</td></tr></table></td></tr></table>";
oPopup.document.body.innerHTML = winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720){
clearTimeout(mytime);
oPopup.hide();
return;
}else if(popTop>1520&&popTop<1720){
oPopup.show(screen.width-250,screen.height,241,1720-popTop);
}else if(popTop>1500&&popTop<1520){
oPopup.show(screen.width-250,screen.height (popTop-1720),241,172);
}else if(popTop<180){
oPopup.show(screen.width-250,screen.height,241,popTop);
}else if(popTop<220){
oPopup.show(screen.width-250,screen.height-popTop,241,172);
}
popTop =10;
var mytime=setTimeout("popshow();",50);
}
</SCRIPT>
标签: 代码
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。
最新资讯
热门推荐