jsalert弹出框⾃动关闭
function Alert(str) {
var msgw,msgh,bordercolor;
msgw=150;//提⽰窗⼝的宽度
msgh=80;//提⽰窗⼝的⾼度
titleheight=25 //提⽰窗⼝标题⾼度
bordercolor="#336699";//提⽰窗⼝的边框颜⾊
titlecolor="#99CCFF";//提⽰窗⼝的标题颜⾊
热水壶var sWidth,sHeight;
//获取当前窗⼝尺⼨
sWidth = document.body.offsetWidth;
sHeight = document.body.offsetHeight;
// //背景div
var ateElement("div");
bgObj.setAttribute('id','alertbgDiv');
bgObj.style.position="absolute";
p="0";
bgObj.style.background="#E8E8E8";
bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; bgObj.style.opacity="0.6";
bgObj.style.left="0";
bgObj.style.width = sWidth + "px";
bgObj.style.height = sHeight + "px";
bgObj.style.zIndex = "10000";
document.body.appendChild(bgObj);
//创建提⽰窗⼝的div
var msgObj = ateElement("div")
msgObj.setAttribute("id","alertmsgDiv");
msgObj.setAttribute("align","center");
msgObj.style.background="white";
msgObj.style.border="1px solid " + bordercolor;
msgObj.style.position = "absolute";
msgObj.style.left = "50%";
msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
/
/窗⼝距离左侧和顶端的距离
msgObj.style.marginLeft = "-225px";
//窗⼝被卷去的⾼+(屏幕可⽤⼯作区⾼/2)-150
p = document.body.scrollTop+(window.screen.availHeight/2)-150 +"px"; msgObj.style.width = msgw + "px";边程个人资料身高
msgObj.style.height = msgh + "px";
Align = "center";
msgObj.style.lineHeight ="25px";
msgObj.style.zIndex = "10001";
document.body.appendChild(msgObj);
//提⽰信息标题
var ateElement("h4");
title.setAttribute("id","alertmsgTitle");
title.setAttribute("align","left");
title.style.margin="0";
title.style.padding="3px";
title.style.background = bordercolor;
title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
title.style.opacity="0.75";
title.style.border="1px solid " + bordercolor;
title.style.height="18px";
title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";
lor="white";
title.innerHTML="提⽰信息";
//提⽰信息
宋祖儿舒畅
var txt = ateElement("p");
txt.setAttribute("id","msgTxt");
快乐女声苏妙玲txt.style.margin="16px 0";
txt.innerHTML = str;
//设置关闭时间
window.setTimeout("closewin()",400);
1.5亿劳斯莱斯}
杨紫名誉权案胜诉
function closewin() {
ElementById("alertbgDiv"));
}