模式窗口

 

Code
Code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
    
<div id="bodyly" style="position: absolute; top: 0px; filter: alpha(opacity=30);
    background-color: #333; z-index: 2; left: 0px; display: none;">
    <iframe id="bodyly2" src="" style="position: absolute; visibility: inherit; top: 0px;
        left: 0px; width: 100%; height: 100%; z-index: 1001; filter: alpha(opacity=0);">
    </iframe>
</div>
<!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 runat="server">
    
<title></title>
    
    
<script language="javascript" type="text/javascript">
function unSearchLayer(){
  document.getElementById(
"bodyly").style.display='none';
  document.getElementById(
"SearchDiv").style.display='none';
  } 
  
  
function JumpSearchLayer(fname){
document.getElementById(
"bodyly").style.display="block";   
document.getElementById(
"bodyly").style.width=document.body.clientWidth;   
document.getElementById(
"bodyly").style.height=document.body.clientHeight;   
document.getElementById(
"SearchDiv").style.display='block';
document.getElementById(
"SearchDiv").style.top=document.documentElement.scrollTop+150;   
document.getElementById(
"SearchDiv").style.left=document.body.clientWidth/2-270;  

</script>
</head>
<body>
    
<form id="form1" runat="server">

<div id="SearchDiv" style="position: absolute; background-color:Blue; z-index: 9999;
    display: none; width: 540px;"><table style="width:100px; height:100px;"><tr><td>asdfasdf</td></tr></table>
    <span id="SearchLayer"></span>
</div>
    
<div>
    
<input type="button" value="asfdasdf" onclick=JumpSearchLayer(); />
    
</div>
    
</form>
    
    

</body>
</html>
posted @ 2009-05-26 21:50  chunchill  阅读(234)  评论(0编辑  收藏  举报