共享偶写的模仿WIN关机效果函数 http://bbs.blueidea.com/thread-2755043-1-1.html
来源:互联网 发布:unity3d游戏视频教程 编辑:程序博客网 时间:2024/06/05 11:31
<script>
function msg(info){
var p=document.createElement("DIV");
if (!info) var info='^_^ 谢谢捧场!!';
p.id="p";
p.style.position="absolute";
p.style.width=document.body.scrollWidth;
p.style.height=(document.body.offsetHeight>document.body.scrollHeight)?'100%':document.body.scrollHeight;
p.style.zIndex='998';
p.style.top='0px';
p.style.left='0%';
p.style.backgroundColor="gray";
p.style.opacity='0.5';
p.style.filter="alpha(opacity=80)";
document.body.appendChild(p);
var p1=document.createElement("DIV");
var top=parseInt(parseInt(document.body.scrollHeight)*0.25)+document.body.scrollTop;
p1.style.position="absolute";
p1.style.width="300px";
p1.id="p1";
var left=Math.ceil(((document.body.scrollWidth)-parseInt(p1.style.width.replace('px','')))/2)+document.body.scrollLeft;
p1.style.height="200px";
p1.style.zIndex='999';
p1.style.top=top+'px';
p1.style.left=left+'px';
p1.style.border="0px solid red";
var html="";
html+="<center>"
html+="<div class='p3' style='height:1px;overflow:hidden;background:red;width:294px;border-left:1px solid red;border-right:1px solid red;'></div>"
html+="<div class='p2' style='height:1px;overflow:hidden;background:red;width:296px;border-left:1px solid red;border-right:1px solid red;'></div>"
html+="<div class='p2' style='height:1px;overflow:hidden;background:red;width:298px;border-left:1px solid red;border-right:1px solid red;'></div>"
html+="<div class='p1' style='height:20px;overflow:hidden;background:red;width:300px;border-left:1px solid red;border-right:1px solid red;color:#fff;font-size:9pt;font-weight:bold;text-align:left;'> ⊙ 提示</div>"
html+="<div id='c' style='height:150px;width:300px;background-color:#FEEACB;overflow:hidden;border-left:1px solid red;border-right:1px solid red;padding-top:40px;font-size:9pt;'>"+info+"<br><br><br>[ <a href='javascript:this.cancle()'>关闭</a> ]</div>"
html+="<div class='p1' style='height:1px;overflow:hidden;background:#FEEACB;width:298px;border-left:1px solid red;border-right:1px solid red;'></div>"
html+="<div class='p2' style='height:1px;overflow:hidden;background:#FEEACB;width:296px;border-left:1px solid red;border-right:1px solid red;'></div>"
html+="<div class='p3' style='height:1px;overflow:hidden;background:red;width:294px;border-left:1px solid red;border-right:1px solid red'></div>"
html+="</center>"
document.body.appendChild(p1);
p1.innerHTML=html;
var arr=document.getElementsByTagName("select");
var i=0;
while(i<arr.length){
arr[i].style.visibility='hidden';
i++;
}
this.cancle=function(){
document.body.removeChild(document.getElementById('p'));
document.body.removeChild(document.getElementById('p1'));
var arr=document.getElementsByTagName("select");
var i=0;
while(i<arr.length){
arr[i].style.visibility='visible';
i++;
}
}
}
</script>
<input value='shout Down' type='button' onClick='msg()' />
--需要修改
- 共享偶写的模仿WIN关机效果函数 http://bbs.blueidea.com/thread-2755043-1-1.html
- http://bbs.blueidea.com/thread-2717864-1-1.html
- http://bbs.blueidea.com/thread-3024031-1-1.html
- Js的MessageBox http://bbs.blueidea.com/thread-2697900-1-1.html
- http://bbs.phppx.com/thread-29-1-1.html
- http://www.boobooke.com/bbs/thread-51022-1-1.html
- http://bbs.dospy.com/thread-545779-1-1.html
- http://bbs.dospy.com/thread-9113535-1-236-1.html
- http://www.boobooke.com/bbs/thread-10284-1-1.html
- http://bbs.ithome.com/thread-542583-1-1.html
- http://bbs.mx3g.com/thread-447875-1-1.html
- http://bbs.ichunqiu.com/thread-10048-1-1.html
- http://bbs.itheima.com/thread-338469-1-1.html
- http://bbs.cmnxt.com/thread-5688-1-1.html
- 系统信息(SI)的调度 http://www.mscbsc.com/bbs/thread-484729-1-1.html
- rrc和rrm的区别 http://www.mscbsc.com/bbs/thread-176892-1-1.html
- http://bbs.51cto.com/thread-1094686-1.html
- http://www.linuxdiyf.com/bbs/thread-90655-1-8.html
- PetShop4.0研究
- Linux下tomcat设置jsp连接mysql 的问题忙了几天,终于搞定
- 温习Java笔记(4):类和对象
- 太钢不锈:行业龙头 业绩大幅增长
- Tomcat5.5.20 与 IIS5.1、IIS6.0的整合方法及心得
- 共享偶写的模仿WIN关机效果函数 http://bbs.blueidea.com/thread-2755043-1-1.html
- Js的MessageBox http://bbs.blueidea.com/thread-2697900-1-1.html
- 一元多项式的代数运算
- [WinForm每日一帖] 如何使用UltraCurrencyEditor
- Tech view for DTD
- Snmp学习笔记
- Setting Up Tomcat 5 on Ubuntu 6.06
- jsp实现字符串截断函数
- 令狐冲和TCP/IP协议的第三层协议的关系(经典)