哪位知道如何实现象“开心网”中的蒙版技术 开心网中,每当点击种菜或车位时显示画面总是出现蒙版效果,还有记数的显示效果。这是怎么实现的?csdn中提示结帖的显示也有蒙版的出现,这是怎么实现的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就是一个层,设置了透明度,将当前的页面大小全部遮蔽起来,z-index设置的很高,show出来就可以了....然后另外一个层,上面有内容,比如登陆什么的,z-index比前面的遮蔽层高一点点,居中,就o了... 简单点就是一div层,设置了css样式,不过现在这种AJAX技术一般都有现成模板了 打开你的IE,选择Internet Options->Advanced->Disable script debugging(Internet Explorer)然后打开你强大的VS,开始debugger吧。 这个用样式控制的透明度,你程序该怎么写还是怎么写,让美工把你显示数据的DIV样式改改就实现了 给你看个简单明了的 -)http://www.cnblogs.com/zhouweiwei/archive/2009/11/25/1610786.html 新建个文本文档,拷贝下面代码,改后缀成html,用IE打开点下按钮就能看到现象<html><head><style>body{font-size:12px;}</style><script type="text/javascript" language="javascript">function divShow(tip){var bgWidth,bgHeight;var msgWidth=300;var msgHeight=100;var titleHeight=20;bgWidth=document.body.offsetWidth;bgHeight=document.body.offsetHeight;var titleBgColor= "#99CCFF";var bgDiv=document.createElement("div");bgDiv.setAttribute("id","bgDiv");bgDiv.style.position="absolute";bgDiv.style.top="0";bgDiv.style.left="0";bgDiv.style.background="#777";bgDiv.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75)";bgDiv.style.opacity="0.6";bgDiv.style.width=bgWidth+"px";bgDiv.style.height=bgHeight+"px";bgDiv.style.zIndex="100";document.body.appendChild(bgDiv);var msgDiv=document.createElement("div");msgDiv.setAttribute("id","msgDiv");msgDiv.setAttribute("align","center");msgDiv.style.background="white";msgDiv.style.position="absolute";msgDiv.style.left="35%";msgDiv.style.top="40%";msgDiv.style.width=msgWidth+"px";msgDiv.style.height=msgHeight+"px";msgDiv.style.textAlign="center";msgDiv.style.zIndex="101";var title=document.createElement("div");title.setAttribute("id","title");title.setAttribute("align","right");title.style.background=titleBgColor;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.height=titleHeight;title.innerHTML="<span id='closeButton' style='cursor:pointer'>Close</span>";document.body.appendChild(msgDiv);document.getElementById("msgDiv").appendChild(title);var txt=document.createElement("p");txt.style.margin="1em 0"txt.setAttribute("id","msgTxt");txt.innerHTML=tip;document.getElementById("msgDiv").appendChild(txt);var closeAll= document.getElementById("closeButton");closeAll.onclick=function(){document.body.removeChild(bgDiv);document.getElementById("msgDiv").removeChild(title);document.body.removeChild(msgDiv); }}</script></head><body><div id="bgContent"><input type="button" value="PopUp" onclick="divShow(document.getElementById('txtInput').value);"/><input id="txtInput" type="input" /></div></body></html> 我记的csdn中也有一帖,来说明这个的,是哪个呢 想找一个.net博客源码修改 查询语句问题? DataGrid控件和GridView具体有什么较大的区别?、 急求英文版电子版下载网址asp.net2.0高级编程或深入领域的电子版书籍以及javascript高级编程最新版或相关.高分求救,一个学习者的渴求.顶者有分. 知道新浪网(sina)的朋友请进,谢谢! 外网访问站点时aspnet_client缺失 大家谈谈,ASP、ASP.net对于现在的发展应是那个好? 帮忙写一条SQL语句 调用javascript的问题 repeateritem 进者得分,重要问题求救 请问oledbparameter使用的sql语句可否这样写,为什么
http://www.cnblogs.com/zhouweiwei/archive/2009/11/25/1610786.html
点下按钮就能看到现象<html>
<head>
<style>
body{
font-size:12px;
}
</style>
<script type="text/javascript" language="javascript">
function divShow(tip){
var bgWidth,bgHeight;
var msgWidth=300;
var msgHeight=100;
var titleHeight=20;
bgWidth=document.body.offsetWidth;
bgHeight=document.body.offsetHeight;
var titleBgColor= "#99CCFF";var bgDiv=document.createElement("div");
bgDiv.setAttribute("id","bgDiv");
bgDiv.style.position="absolute";
bgDiv.style.top="0";
bgDiv.style.left="0";
bgDiv.style.background="#777";
bgDiv.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75)";
bgDiv.style.opacity="0.6";
bgDiv.style.width=bgWidth+"px";
bgDiv.style.height=bgHeight+"px";
bgDiv.style.zIndex="100";
document.body.appendChild(bgDiv);var msgDiv=document.createElement("div");
msgDiv.setAttribute("id","msgDiv");
msgDiv.setAttribute("align","center");
msgDiv.style.background="white";
msgDiv.style.position="absolute";
msgDiv.style.left="35%";
msgDiv.style.top="40%";
msgDiv.style.width=msgWidth+"px";
msgDiv.style.height=msgHeight+"px";
msgDiv.style.textAlign="center";
msgDiv.style.zIndex="101";var title=document.createElement("div");
title.setAttribute("id","title");
title.setAttribute("align","right");
title.style.background=titleBgColor;
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.height=titleHeight;
title.innerHTML="<span id='closeButton' style='cursor:pointer'>Close</span>";document.body.appendChild(msgDiv);
document.getElementById("msgDiv").appendChild(title);
var txt=document.createElement("p");
txt.style.margin="1em 0"
txt.setAttribute("id","msgTxt");
txt.innerHTML=tip;
document.getElementById("msgDiv").appendChild(txt);
var closeAll= document.getElementById("closeButton");
closeAll.onclick=function(){
document.body.removeChild(bgDiv);
document.getElementById("msgDiv").removeChild(title);
document.body.removeChild(msgDiv);
}
}
</script>
</head>
<body>
<div id="bgContent">
<input type="button" value="PopUp" onclick="divShow(document.getElementById('txtInput').value);"/>
<input id="txtInput" type="input" />
</div>
</body>
</html>