就是这种效果,打开一个div什么的,后面的标签全部灰化,只能点击这一个小窗口,很多登录,注册,都用这种效果,这个怎么能做出来呢?最主要是想问问怎么让背景灰化,点不到
解决方案 »
- java 正则表达式替换img src地址
- jsp页面未加载完毕被关闭,抛java.net.SocketException: Connection reset by peer: socket write
- 如何将一个Integer型转换成负的大写的Short型
- 一个JSP里的错误,高手看
- 求帮助文件,象什么GetBytes这样的东西怎么用~
- 散分20,基于TOMCAT开发的JAVA程序,对并发用户数有没有限制啊,TOMCAT会不会限制用户数啊
- java文件上传问题
- IE8点击退出按钮时,让cookie过期的js
- Jive问题出错
- java读取xml
- ie8 frameset的问题,菜单老在左侧frame区域显示。
- 我想问问jsp中服务器端怎样给client端发送一个参数啊
http://download.csdn.net/detail/s478853630/4159478
不妨一试
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript">
function openDiv() {
document.getElementById("div1").style.display = 'block';
document.getElementById("div1").style.filter = 'alpha(opacity=30)';
document.getElementById("div2").style.display = 'block';
}
function closeDiv() {
document.getElementById("div1").style.display = 'none';
document.getElementById("div2").style.display = 'none';
}
</script>
</head> <body>
<div style="z-index: 0"><input type="button" onclick="openDiv()" value="添加用户"/><input/></div>
<div id="div1" style="position: absolute; z-index: 1; display: none; background-color: gray; width: 100%; height: 100%; top: 0; left: 0; filter:alpha(opacity=30);"></div>
<div id="div2" style="position: absolute; z-index: 2; display: none; width: 300px; height: 60px; top: 100px; left: 100px; background-color: blue;">
<input id="username"/><input type="button" onclick="closeDiv()" value="确认"/></div>
</body>
</html>