本文主要是介绍如何在网页右下角弹出popup提示框,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
<html>
<head>
<title>如何在网页右下角弹出提示框</title>
</head>
<body>
<div>
</div>
</body>
</html>
<script>
var oPopup = window.createPopup();
var popTop=50;
function popmsg(msgstr){
var winstr="<table style=/"border: 1 solid #6D93C8/" width=/"241/" height=/"172/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/" >";
winstr+="<tr><td height=/"30/"> </td></tr><tr><td align=/"center/"><table width=/"90%/" height=/"110/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/">";
winstr+="<tr><td valign=/"top/" style=/"font-size:12px; color: #6D93C8; 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();",200);
}
popmsg("欢迎进入苏某人的传奇世界!");
</script>
这篇关于如何在网页右下角弹出popup提示框的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!