使用层弹出对话框
2008-08-05 18:08
204 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
</head>
<body>
<a href="javascript:showBox();">忘记了密码?</a>
<div id="box" style="display:none;height:auto !important; height:150px; min-height:150px; width:320px; top:100px; left:150px; position:absolute;FILTER: alpha(opacity=0); opacity:0;border:1px #CCCCCC solid; padding:10px; text-align:left; line-height:24px; background-color:#FAFCFD; z-index:999; ">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right"><a href="javascript:GradientClose();">[关闭]</a></td>
</tr>
<tr>
<td>若您忘记密码,职业帆的客服人员可以帮您找回密码!</td>
</tr>
<tr>
<td>客服人员的联系方式:</td>
</tr>
<tr>
<td>1.<img src="image/mail.gif" width="15" height="11" align="absmiddle" /> 电子邮箱:vsail@oafar.com</td>
</tr>
<tr>
<td> 请在邮件中注明您的会员名,会员类型,以及联系方式。</td>
</tr>
<tr>
<td>2.<img src="image/telepone.gif" width="16" height="16" align="absmiddle" /> 电 话:0571-28931325</td>
</tr>
</table>
</div>
<SCRIPT language=javascript>
var intDelay=50; //设置显示速度,越大越慢
4000
var intInterval=10;
var box = document.getElementById("box");
var isIE = /msie/.test(navigator.userAgent.toLowerCase());
function showBox(){
if(isIE)
box.filters.alpha.opacity=0;
else
box.style.opacity=0;
box.style.display="block";
GradientShow();
}
function GradientShow()
{
if(isIE){
box.filters.alpha.opacity+=intInterval;
if (box.filters.alpha.opacity<100)
setTimeout(GradientShow,intDelay);
}else{
box.style.opacity=parseFloat(intInterval/100)+parseFloat(box.style.opacity);
if (box.style.opacity<1)
setTimeout(GradientShow,intDelay);
}
}
function GradientClose()
{
if(isIE){
box.filters.alpha.opacity-=intInterval;
if (box.filters.alpha.opacity>0)
setTimeout(GradientClose,intDelay);
else
box.style.display="none";
}else{
box.style.opacity=parseFloat(box.style.opacity)-parseFloat(intInterval/100);
if (box.style.opacity>0)
setTimeout(GradientClose,intDelay);
else
box.style.display="none";
}
}
</SCRIPT>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
</head>
<body>
<a href="javascript:showBox();">忘记了密码?</a>
<div id="box" style="display:none;height:auto !important; height:150px; min-height:150px; width:320px; top:100px; left:150px; position:absolute;FILTER: alpha(opacity=0); opacity:0;border:1px #CCCCCC solid; padding:10px; text-align:left; line-height:24px; background-color:#FAFCFD; z-index:999; ">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right"><a href="javascript:GradientClose();">[关闭]</a></td>
</tr>
<tr>
<td>若您忘记密码,职业帆的客服人员可以帮您找回密码!</td>
</tr>
<tr>
<td>客服人员的联系方式:</td>
</tr>
<tr>
<td>1.<img src="image/mail.gif" width="15" height="11" align="absmiddle" /> 电子邮箱:vsail@oafar.com</td>
</tr>
<tr>
<td> 请在邮件中注明您的会员名,会员类型,以及联系方式。</td>
</tr>
<tr>
<td>2.<img src="image/telepone.gif" width="16" height="16" align="absmiddle" /> 电 话:0571-28931325</td>
</tr>
</table>
</div>
<SCRIPT language=javascript>
var intDelay=50; //设置显示速度,越大越慢
4000
var intInterval=10;
var box = document.getElementById("box");
var isIE = /msie/.test(navigator.userAgent.toLowerCase());
function showBox(){
if(isIE)
box.filters.alpha.opacity=0;
else
box.style.opacity=0;
box.style.display="block";
GradientShow();
}
function GradientShow()
{
if(isIE){
box.filters.alpha.opacity+=intInterval;
if (box.filters.alpha.opacity<100)
setTimeout(GradientShow,intDelay);
}else{
box.style.opacity=parseFloat(intInterval/100)+parseFloat(box.style.opacity);
if (box.style.opacity<1)
setTimeout(GradientShow,intDelay);
}
}
function GradientClose()
{
if(isIE){
box.filters.alpha.opacity-=intInterval;
if (box.filters.alpha.opacity>0)
setTimeout(GradientClose,intDelay);
else
box.style.display="none";
}else{
box.style.opacity=parseFloat(box.style.opacity)-parseFloat(intInterval/100);
if (box.style.opacity>0)
setTimeout(GradientClose,intDelay);
else
box.style.display="none";
}
}
</SCRIPT>
</body>
</html>
相关文章推荐
- 使用ajax之后弹出对话框的方法
- 解决AJAX中使用UpdatePanel后再用Response.Write();等无法弹出对话框问题 3法
- 使用div和js脚本弹出对话框
- ASP.NET 使用alert弹出对话框后,CSS样式失效,字体变大的解决方法
- asp.net使用ajax后如何在客户端弹出提示对话框
- ASP.NET使用弹出窗口(对话框)的体会
- NET使用了UpdatePanel后如何弹出对话框!
- C#使用jquery-ui弹出对话框
- 解决AJAX中使用UpdatePanel后再用Response.Write();无法弹出对话框问题
- ASP.NET2.0中ClientScriptManager的用法(使用ASP.NET 2.0 AJAX 弹出对话框)
- Extjs在vs中使用及弹出对话框的介绍
- 跳过window无关联时弹出的[使用web服务查找合适的程序]对话框,直接显示打开方式对话框
- 一个JQuery弹出对话框插件的使用
- 经常使用的android弹出对话框
- Android中使用广播接收者来弹出对话框的坑
- 关于使用python调用Google浏览器弹出停用开发者模式的对话框问题
- window.dialogArguments的使用 html弹出对话框
- 经常使用的android弹出对话框
- ThinkPHP第二十一天(JQuery元素获取,parents属性,toggle方法,确认弹出对话框使用)
- Air for Android开发中使用Back键弹出是否退出对话框