惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

博客园 - shcity

Troubleshooting on TransactionScope Parse string to JSON object Parse date in js blockUI doesn't close when download file in asp.net define namespace in JS Dense_Rank(), Row_Number(), Rank() in sql server reading and writing variable through lock in SSIS script task Fix the issue that cannot open SSIS in BIDS three ways creating custom helpers to show RadioButtonList in MVC using JavaScriptSerializer to serialize object to json using ISerializable to control serialization and deserialization ViewStateAutoManager ReportingService formatting Build my own DataTable split a string into an array through comma 正则表达式替换日期 半透明的div对话框 foreach 的自动转化类型 在Ajax1.0中调用页面CS文件中的方法
div with separated html template - shcity
shcity · 2011-01-24 · via 博客园 - shcity

代码

<!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>
    
<title></title>
    
<script>
        
function setSize(div, innerDiv) {
            
var doc = document.documentElement;
            
var sw = parseFloat(doc.scrollWidth);
            
var cw = parseFloat(doc.clientWidth);
            
var sh = parseFloat(doc.scrollHeight);
            
var ch = parseFloat(doc.clientHeight);

            div.style.width 

= sw >= cw ? sw : cw;
            div.style.height 
= sh >= ch ? sh : ch;

            innerDiv.style.display 

= '';
            innerDiv.style.left 
= parseFloat(doc.scrollLeft) + cw / 2 - parseFloat(innerDiv.clientWidth) / 2;
            innerDiv.style.top 
= parseFloat(doc.scrollTop) + ch / 2 - parseFloat(innerDiv.clientHeight) / 2;

        }

function openNewWindow() {
            
var div = document.getElementById("container");
            
var innerDiv = document.getElementById("content");
            setSize(div, innerDiv);

            window.attachEvent(

"onresize"function() { setSize(div, innerDiv) });
            window.attachEvent(
"onscroll"function() { setSize(div, innerDiv) }); 

        }

function closeWindow() {
            
var div = document.getElementById("container");
            
var innerDiv = document.getElementById("content");
            div.style.width 
= 0;
            div.style.height 
= 0;
            innerDiv.style.display 
= 'none';
        }
        
        
function Button1_onclick() {
            openNewWindow();
        }
</script>
</head>
<body>
    
<div id="container" style="filter: alpha(opacity=40); position: absolute; top: 0px;
        left: 0px; z-index: 9998; background: black"
>
    
</div>
    
<div id="content" style="height: 200px; width: 300px; position: absolute;
        display: none; z-index: 9999;"
>
        
<div style="text-align: center; background-color: Gray;border:solid 1px gray">
            
<iframe style="border-style: none; width: 100%; height: 100%;" frameborder="0">
            
</iframe>            
            
<button onclick="closeWindow();">
                close
</button>
        
</div>
    
</div>
    
<p>
        
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /></p>
</body>
</html>