求一段js代码 如何点击一个按纽屏幕不能点击的功能类似csdn的帖子提前一样的效果 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 很简单……点一下,出来一个层,这个层,布满网页z-index 在最上买!背景颜色用透明! 直接复制运行就可以了: <!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=utf-8" /> <title>LIGHTBOX效果</title> <style> .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border: 16px solid orange; background-color: white; z-index:1002; overflow: auto; } </style> </head> <body> <p>根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">点击这里打开窗口</a></p> <div id="light" class="white_content">This is the lightbox content. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div> <div id="fade" class="black_overlay"></div> </body></html> <!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=gb2312" /><title>无标题文档</title><style type="text/css" media="screen"><!--.box1 {background:#FFF1F1;border:1px solid #FCB1AE}--></style><script type="text/javascript">/*作者:Daviv博客:http://blog.163.com/jxdawei时间:2006-10-27感谢:wenming (Blueidea)功能:弹出提示方法:调用sAlert("您要弹出的信息"); */function sAlert(str){var msgw,msgh,bordercolor;msgw=400;//提示窗口的宽度msgh=100;//提示窗口的高度titleheight=25 //提示窗口标题高度bordercolor="#336699";//提示窗口的边框颜色titlecolor="#99CCFF";//提示窗口的标题颜色var sWidth,sHeight;sWidth=document.body.offsetWidth;sHeight=document.body.offsetHeight;if (sHeight<screen.height){ sHeight=screen.height;}var bgObj=document.createElement("div");bgObj.setAttribute('id','bgDiv');bgObj.style.position="absolute";bgObj.style.top="0";bgObj.style.background="#777";//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);var msgObj=document.createElement("div")msgObj.setAttribute("id","msgDiv");msgObj.setAttribute("align","center");msgObj.style.background="white";msgObj.style.border="1px solid " + bordercolor;msgObj.style.position = "absolute";msgObj.style.left = "50%";msgObj.style.top = "50%";msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";msgObj.style.marginLeft = "-225px" ;msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";msgObj.style.width = msgw + "px";msgObj.style.height =msgh + "px";msgObj.style.textAlign = "center";msgObj.style.lineHeight = (msgh-titleheight) + "px";msgObj.style.zIndex = "10001";var title=document.createElement("h4");title.setAttribute("id","msgTitle");title.setAttribute("align","right");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";title.style.color="white";title.style.cursor="pointer";title.innerHTML="关闭";title.onclick=function(){ document.body.removeChild(bgObj); document.getElementById("msgDiv").removeChild(title); document.body.removeChild(msgObj); }document.body.appendChild(msgObj);document.getElementById("msgDiv").appendChild(title);var txt=document.createElement("p");txt.style.margin="1em 0"txt.setAttribute("id","msgTxt");txt.innerHTML=str;document.getElementById("msgDiv").appendChild(txt);}</script></head><body><div style="width:100%;height:600px;" class="box1"><input type="button" onclick="sAlert('000000000')" value="sAlert('000000000')" /></div></body></html> asp.net gridview作分页显示时,有点问题,解决全给他分了。 请教大家SqlBulkCopy能否向多张表插入数据 递规 请教一个简单问题 请教一简单问题 <script src=".." >, <link href="..." >链接文件的路径问题 两个提交按钮时的验证控件问题 请教page.RegisterStartupScript与Response.Write的区别 不想做设计,想做编程 请问页面间的数据参数怎么传递,用什么方法去获取参数? xmlhttp的open方法可以调用当前页面的后台方法吗? Datagrid中第一列是超级链接列的取值
z-index 在最上买!背景颜色用透明!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LIGHTBOX效果</title>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
</style>
</head>
<body>
<p>根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">点击这里打开窗口</a></p>
<div id="light" class="white_content">This is the lightbox content. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
<div id="fade" class="black_overlay"></div>
</body>
</html>
<!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=gb2312" />
<title>无标题文档</title>
<style type="text/css" media="screen">
<!--
.box1 {background:#FFF1F1;border:1px solid #FCB1AE}
-->
</style>
<script type="text/javascript">
/*
作者:Daviv
博客:http://blog.163.com/jxdawei
时间:2006-10-27
感谢:wenming (Blueidea)功能:弹出提示
方法:调用sAlert("您要弹出的信息"); */function sAlert(str){
var msgw,msgh,bordercolor;
msgw=400;//提示窗口的宽度
msgh=100;//提示窗口的高度
titleheight=25 //提示窗口标题高度
bordercolor="#336699";//提示窗口的边框颜色
titlecolor="#99CCFF";//提示窗口的标题颜色var sWidth,sHeight;
sWidth=document.body.offsetWidth;
sHeight=document.body.offsetHeight;
if (sHeight<screen.height)
{
sHeight=screen.height;
}var bgObj=document.createElement("div");
bgObj.setAttribute('id','bgDiv');
bgObj.style.position="absolute";
bgObj.style.top="0";
bgObj.style.background="#777";
//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);var msgObj=document.createElement("div")
msgObj.setAttribute("id","msgDiv");
msgObj.setAttribute("align","center");
msgObj.style.background="white";
msgObj.style.border="1px solid " + bordercolor;
msgObj.style.position = "absolute";
msgObj.style.left = "50%";
msgObj.style.top = "50%";
msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
msgObj.style.marginLeft = "-225px" ;
msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
msgObj.style.width = msgw + "px";
msgObj.style.height =msgh + "px";
msgObj.style.textAlign = "center";
msgObj.style.lineHeight = (msgh-titleheight) + "px";
msgObj.style.zIndex = "10001";var title=document.createElement("h4");
title.setAttribute("id","msgTitle");
title.setAttribute("align","right");
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";
title.style.color="white";
title.style.cursor="pointer";
title.innerHTML="关闭";
title.onclick=function(){
document.body.removeChild(bgObj);
document.getElementById("msgDiv").removeChild(title);
document.body.removeChild(msgObj);
}
document.body.appendChild(msgObj);
document.getElementById("msgDiv").appendChild(title);
var txt=document.createElement("p");
txt.style.margin="1em 0"
txt.setAttribute("id","msgTxt");
txt.innerHTML=str;
document.getElementById("msgDiv").appendChild(txt);
}
</script>
</head><body>
<div style="width:100%;height:600px;" class="box1">
<input type="button" onclick="sAlert('000000000')" value="sAlert('000000000')" />
</div>
</body>
</html>