Bottom right corner pop-up prompt box presumably we will not be unfamiliar with it, this article simple for everyone to achieve a, specific code as follows, the need for friends can refer to the
Copy CodeThe code is as follows:
<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%>
<%
String path = Request.getcontextpath ();
String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";
%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> Untitled Document </title>
<style type= "Text/css" >
* {margin:0px;padding:0px;}
html,body {height:100%;}
body {font-size:14px; line-height:24px;}
#tip {
Position:absolute;
right:0px;
bottom:0px;
height:0px;
width:180px;
border:1px solid #CCCCCC;
Background-color: #eeeeee;
padding:1px;
Overflow:hidden;
Display:none;
font-size:12px;
Z-index:10;
}
#tip p {padding:6px;}
#tip H1, #detail H1 {
font-size:14px;
height:25px;
line-height:25px;
Background-color: #0066CC;
Color: #FFFFFF;
padding:0px 3px 0px 3px;
Filter:alpha (opacity=100);
}
#tip H1 A, #detail H1 a {
Float:right;
Text-decoration:none;
Color: #FFFFFF;
}
#shadow {
Position:absolute;
width:100%;
height:100%;
Background-color: #000000;
Z-index:11;
Filter:alpha (opacity=70);
Display:none;
Overflow:hidden;
}
#detail {
width:500px;
height:200px;
BORDER:3PX double #ccc;
Background-color: #FFFFFF;
Position:absolute;
z-index:30;
Display:none;
left:30%;
top:30%
}
</style>
<script type= "Text/javascript" >
var handle;
function Start ()
{
var obj = document.getElementById ("Tip");
if (parseint (obj.style.height) ==0)
{obj.style.display= "block";
Handle = SetInterval ("Changeh (' Up ')", 2);
}else
{
Handle = SetInterval ("Changeh (' Down ')", 2)
}
}
function Changeh (str)
{
var obj = document.getElementById ("Tip");
if (str== "up")
{
if (parseint (obj.style.height) >200)
Clearinterval (handle);
Else
Obj.style.height= (parseint (obj.style.height) +8). ToString () + "px";
}
if (str== "down")
{
if (parseint (obj.style.height) <8)
{clearinterval (handle);
Obj.style.display= "None";
}
Else
Obj.style.height= (parseint (obj.style.height) -8). ToString () + "px";
}
}
function Showwin ()
{
document.getElementsByTagName ("HTML") [0].style.overflow = "hidden";
Start ();
document.getElementById ("Shadow"). style.display= "Block";
document.getElementById ("detail"). style.display= "Block";
}
function Recover ()
{
document.getElementsByTagName ("HTML") [0].style.overflow = "Auto";
document.getElementById ("Shadow"). Style.display= "None";
document.getElementById ("detail"). style.display= "None";
}
</script>
<body onload= "document.getElementById" (' Tip '). style.height= ' 0px ' >
<div id= "Shadow" > </div>
<div id= "Detail" >
</div>
<div id= "Tip" >
</body>
<script language= "JavaScript" >
Window.attachevent ("onload", MyTimer); Bind to onload Event
function MyTimer () {
Start ();
Window.settimeout ("MyTimer ()", 6000);/Set cycle time
}
</script>