Ciao questo è un esempio semplice da capire.
codice:
<!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-Language" content="it" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>esempio</title>
<script type="text/javascript" language="javascript">
var param="";
function popup(param){
if(param=="apri"){
document.getElementById("ombra").style.display="block";
document.getElementById("popup").style.display="block";
}
else
{
document.getElementById("ombra").style.display="none";
document.getElementById("popup").style.display="none";
}
}
</script>
<style type="text/css">
<!--
#ombra{
display:none;
filter: Blur(Add = 0, Direction = 225, Strength = 10);
filter:alpha(opacity=50);
opacity:0.5;
top:0px;
left:0px;
position:absolute;
z-index:1;
background-color:#000;
width:100%;
height:100%;
}
#popup{
display:none;
padding:5px;
width:300px;
height:200px;
border:2px yellow dashed;
background-color:#fff;
position:absolute;
top:50%;
margin-top:-100px;
left:50%;
margin-left:-150px;
z-index:2;
}
.n1{
text-align:center;
color:red;
}
.bottone{
border:1px gray solid ;
background-color:#FFFFCC;
color:black;
cursor:pointer;
}
-->
</style>
</head>
<body>
<div id="ombra">
</div>
<div id="popup">
<p class="n1"><span id="bottone" class="bottone" onmouseover="document.getElementById('bottone').style.backgroundColor='#FFF3dd'" onmouseout="document.getElementById('bottone').style.backgroundColor='#FFFFCC'" onclick="popup('chiudi')">chiudi popup</span></p>
</div>
</p>
<p class="n1"><span id="bottone1" class="bottone" onmouseover="document.getElementById('bottone1').style.backgroundColor='#FFF3dd'" onmouseout="document.getElementById('bottone1').style.backgroundColor='#FFFFCC'" onclick="popup('apri')">apri popup</span></p>
</p>
<h1 class="n1">Pagina sottostante</h1>
</body>
</html>