DIV 弹出层
来源:互联网 发布:设置软件管理员权限 编辑:程序博客网 时间:2024/05/02 00:10
//弹出缓慢居中的层
//divid 层的ID timeNum 设置每次执行的时间
//页面调用
function showDiv() {
showSlowCenter("messsagessss", "10");
showCenter("messsagessss"); }
function showSlowCenter(divid,timeNum) { var div = document.getElementById(divid); div.style.display = "block"; var posX, posY; var top = (window.screen.height - 420) / 2; var left = (window.screen.width - 400) / 2; if (window.innerHeight) { posX = window.pageXOffset; posY = window.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { posX = document.documentElement.scrollLeft; posY = document.documentElement.scrollTop; } else if (document.body) { posX = document.body.scrollLeft; posY = document.body.scrollTop; } div.style.left = (left) + "px"; var toppx = -100; var hight = (posY + top) - 30; if (toppx < hight) setTimeout(function() { showBox(toppx, divid, hight, timeNum) }, timeNum);}//弹出居中的层function showCenter(divid) { var div = document.getElementById(divid); div.style.display = "block"; var posX, posY; var top = (window.screen.height - 420) / 2; var left = (window.screen.width - 400) / 2; if (window.innerHeight) { posX = window.pageXOffset; posY = window.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { posX = document.documentElement.scrollLeft; posY = document.documentElement.scrollTop; } else if (document.body) { posX = document.body.scrollLeft; posY = document.body.scrollTop; } div.style.top = (posY + top) + "px"; div.style.left = (left) + "px";}function showBox(toppx, obj, tops, timeNum) { document.getElementById(obj).style.top = toppx + "px"; var toppx = toppx + 6; if (toppx < tops) setTimeout(function() { showBox(toppx, obj, tops, timeNum) }, timeNum);}function showBox2(o) { if (o == undefined) o = document.getElementById("Div1"); o.style.height = o.clientHeight + 6 + "px"; if (o.clientHeight < 240) setTimeout(function() { showBox2(o) }, 5);}function closebox(o) { if (o == undefined) o = document.getElementById("Div1"); o.style.height = o.clientHeight - 6 + "px"; if (o.clientHeight > 0) setTimeout(function() { closebox(o) }, 5);}
- 弹出div层
- js弹出div层
- div弹出层
- DIV 弹出层
- div弹出层
- DIV弹出层代码
- 动态弹出DIV层
- div弹出层
- 弹出div层
- js弹出层(DIV)
- Div弹出层
- div弹出层
- 点击 div 弹出层
- jquery弹出div层
- div弹出层
- 弹出Div层
- div+js 弹出层
- 遮罩层 div弹出层
- 讲解七种数据库中Select Top的使用方法
- ScrollBar & ScrollWindow
- win7 shell命令
- 禁止本地中断
- Response.Write("") 将页面字体 撑大解决办法
- DIV 弹出层
- 去除表达式里面多余的()
- http://www.bookuu.com/kgsm/ts/2009/07/08/1551125.shtml
- 简单的排序算法
- jQuery 对select操作
- 极地星空android学习笔记(二)android各类命令和工具的使用(有图有真相)
- AJAX_EXT EXT开发时,注意以及技巧
- ubuntu下载安装rrdtool
- 《C专家编程》学习总结2