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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
V
V2EX
G
Google Developers Blog
F
Full Disclosure
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
H
Hacker News: Front Page
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
NISL@THU
NISL@THU
G
GRAHAM CLULEY
V
Vulnerabilities – Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
About on SuperTechFans
The Cloudflare Blog
C
Cisco Blogs
D
DataBreaches.Net
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
P
Privacy International News Feed
Microsoft Security Blog
Microsoft Security Blog
Help Net Security
Help Net Security
Recorded Future
Recorded Future
PCI Perspectives
PCI Perspectives
S
Schneier on Security
AI
AI
N
News | PayPal Newsroom
雷峰网
雷峰网
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
L
LINUX DO - 最新话题
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
Schneier on Security
Schneier on Security
S
Securelist
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
博客园_首页
AWS News Blog
AWS News Blog
TaoSecurity Blog
TaoSecurity Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 三生石上(FineUI控件)
C
CXSECURITY Database RSS Feed - CXSecurity.com
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cloudbric
Cloudbric
C
Cybersecurity and Infrastructure Security Agency CISA
Project Zero
Project Zero
C
Check Point Blog
S
Security Affairs

博客园 - 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>