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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - Siko

Sql Server中的日期和时间函数 在html中显示PHP源文件的几种方法 neebaa依然缺人 C#2.0相关 如何才能成为一名真正的Web程序员 zt ASP常用函数表 - Siko - 博客园 真正的大牛(zz) win 2003 server的一些优化设置 快速关闭Win2003的三种方法 生成静态页大全[ASP/PHP/ASPX] 收集自落伍论坛 ASP学习:错误80004005信息处理方法 ASP之对象总结 ASP中各种数据库连接代码 Temporary ASP.NET Files 下的不能生成dll文件。。。。 关于.NET 访问Oracle数据库 SQL查询语句使用 The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experience SqlDataAdapter使用存储过程不能使用参数? IIS 错误代码大汇总
关于弹窗 - Siko - 博客园
Siko · 2005-11-12 · via 博客园 - Siko

弹窗一:这个测试尝试打开两个网页对话框。
测试结果:√表示弹出  ×表示被灭杀
myie √
theworld √
iesp2 √

    <script language="JavaScript" type="text/javascript">
              function openBadPopUp()
            {
                    try
                        {
                                var xWin1=window.showModelessDialog("badpopup.html", "", "dialogLeft:20px; dialogTop:20px");
                                var xWin2=window.showModalDialog("badpopup.html", "", "dialogLeft:200px; dialogTop:200px");
                    }
                        catch (er)
                        {
                        }
            }
     </script>

弹窗二:这里使用一种非标准的方法来弹出窗口。
测试结果:√表示弹出  ×表示被灭杀
myie ×
theworld √
iesp2 √

    <script language="JavaScript" type="text/javascript">
            var xWin = null;

                function closePopup()
                {
                    xWin.hide();
                }

              function openBadPopUp()
            {
                    try
                        {
                                xWin=window.createPopup();
                                var vhtml= '<DIV STYLE="position: absolute; top: 0; left:0; width:462; height:351; z-index: 4" id="popupdiv"><img src="popup.gif" usemap="#popupmap" name="popupimage" alt="" border="0"><map name="popupmap"><area alt="" shape="rect" coords="435,1,460,25" onclick="" onmouseover="popupimage.style.cursor=\'hand\';" onmouseout="popupimage.style.cursor=\'auto\';"></map></DIV>';
                                xWin.document.body.innerHTML = vhtml;
                                xWin.document.body.onmouseup = closePopup;
                                xWin.show(200, 200, 462, 351);
                    }
                        catch (er)
                        {
                        }
            }
     </script>

弹窗三:这个测试页弹出一个基于层(layer)的窗口。这实际上不是一个真正的弹出窗口,但是它看起来没有什么区别.
测试结果:√表示弹出  ×表示被灭杀
myie √
theworld √
iesp2 √

<script language="JavaScript" type="text/javascript">
                function findObj(name, doc)
                {
                  var x = doc[name];                  
                  if (x) return x;  
                  if (doc.all)
                  {
                    x=doc.all[name];
                  }
                  if (x) return x;
                  for(var i=0; doc.layers && i < doc.layers.length; i++)
                  {
                    x=MM_findObj(name, doc.layers[i].document);
                  }                  
                  if (x) return x;
                  if (doc.getElementById)
                  {
                    x=doc.getElementById(name);
                  }                       
                  return x;
                }
                function showHideLayers(name, hideOrShow)
                {
                  var obj = findObj(name, document);
                  if (obj.style)
                  {
                    obj=obj.style;
                        v = (hideOrShow=='show') ? 'visible' : (hideOrShow=='hide') ? 'hidden' : hideOrShow;
                  }
                  obj.visibility = v;
                }
        </script>

        <DIV STYLE="position: absolute; top: 30; left:50; width:462; height:351; z-index: 4" id="popupdiv">
                <img src="popup.gif" usemap="#popupmap" name="popupimage" alt="" border="0">
                <map name="popupmap">
                        <area href="#" alt="" shape="rect"
                                coords="435,1,460,25"                       
                                onclick="showHideLayers('popupdiv','hide');popupdiv.style.display='none';"       
                                onmouseover="popupimage.style.cursor='hand';"
                                onmouseout="popupimage.style.cursor='auto';">
                </map>
        </DIV>

弹窗四:本测试会弹出一个对话框询问您是否将网页添加到活动桌面。
测试结果:√表示弹出  ×表示被灭杀
myie ×
theworld ×
iesp2 √

  <script language="JavaScript" type="text/javascript">
    function openQuestion()
    {
            try
                {
                        window.external.AddDesktopComponent(
                           "http://www.im286.com",
                           "website",
                           100,100,200,200
                        );
        }
                catch (er)
                {
                }
    }
  </script>

  弹窗五:不是只有弹出窗口才烦人。这个测试会尝试在浏览器左边开一个侧栏。
测试结果:√表示弹出  ×表示被灭杀
myie √
theworld √
iesp2 √

  <script language="JavaScript" type="text/javascript">
    function openSidebar()
    {
            try
                {
                    window.sidebar.addPanel ("弹出窗口", "badpopup.html","");

                }
                catch (er)
                {
                }

                try
                {
                   var theLink = findObj("link", document);
                   theLink.click();
                }
                catch (er)
                {
                }

            try
            {
            var xWin1=window.open("badpopup.html", "_search");
                        //var xWin2=window.open("badpopup.html", "_media");
            }
            catch (er)
            {
            }
    }

        function findObj(name, doc)
        {
          var x = doc[name];          
          if (x) return x;  
          if (doc.all)
          {
                x=doc.all[name];
          }
          if (x) return x;
          for(var i=0; doc.layers && i < doc.layers.length; i++)
          {
                x=MM_findObj(name, doc.layers[i].document);
          }          
          if (x) return x;
          if (doc.getElementById)
          {
                x=doc.getElementById(name);
          }               
          return x;
        }
  </script>
  <div onmouseover="javascript:openSidebar();" style="COLOR: #f2f2f2; BACKGROUND-COLOR: #BFBDBD"><a href="badpopup.html" rel="sidebar" name="link" target="_search" style="COLOR: #BFBDBD;"></a></div>