asp.net – HTML divs可以在浏览器窗口之外?

我正在玩ASP.NET Web部件,它有一个“下拉”div.它一直到页面右侧.当我点击它时,它会离开窗户.通常,可视区域外的任何内容都会触发底部滚动条.这怎么可能?

alt text http://i42.tinypic.com/4sejww.png

编辑:它是Internet Explorer 8.下面是带有一些上下文的标记.我认为相关的一个是id = WebPart_wp774658725VerbsMenu.认情况下,它不显示.当你点击td / span Verbs / span VerbsPopup(它可能是任何)时,它会显示“下拉列表”.在开发人员工具中,我没有看到任何JavaScript附加到这些元素,但如果我调试它,我看到它运行一些.

<TD class=partTitle>
  <TABLE style="WIDTH: 100%" border=0 cellSpacing=0 cellPadding=0>
    <TBODY>
      <TR>
        <TD style="WIDTH: 100%; WHITE-SPACE: Nowrap; CURSOR: move" id=WebPartTitle_wp774658725><SPAN title="Billing information">Billing information</SPAN>&nbsp;</TD>
        <TD style="WHITE-SPACE: Nowrap">
          <SPAN style="PADDING-BottOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; disPLAY: inline-block; COLOR: white; CURSOR: hand; TEXT-decoration: none; PADDING-TOP: 1px" id=WebPart_wp774658725Verbs>
            <SPAN style="FONT-FAMILY: Marlett; FONT-SIZE: 8pt" id=WebPart_wp774658725VerbsPopup>u</SPAN>
          </SPAN>
          <DIV style="disPLAY: none" id=WebPart_wp774658725VerbsMenu>
            <TABLE style="BORDER-BottOM: white 1px solid; BORDER-LEFT: white 1px solid; BACKGROUND-COLOR: maroon; WIDTH: 100%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; FONT-SIZE: 0.8em; BORDER-TOP: white 1px solid; BORDER-RIGHT: white 1px solid" cellSpacing=0 cellPadding=1>
              <TBODY>
                <TR>
                  <TD style="WHITE-SPACE: Nowrap">
                    <DIV>
                      <A class=menuItem title="Deletes 'Billing information'" onclick="if(document.body.__wpmDeleteWarning.length == 0 || confirm(document.body.__wpmDeleteWarning)){document.body.__wpm.SubmitPage('WebFormdisplay1$MainPageWPZ','delete:wp774658725');}" href="javascript:void(0)">
                        <IMG style="BORDER-BottOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; VERTICAL-ALIGN: middle; BORDER-LEFT-STYLE: none" alt="Deletes 'Billing information'" src="/WebResource.axd?d=5L7XWTaglMPmXRe6NJDkRg2&amp;t=633802513995006876" width=16 height=16>&nbsp;Delete&nbsp;
                      </A>
                    </DIV>
                  </TD>
                </TR>
              </TBODY>
            </TABLE>
          </DIV>
        </TD>
      </TR>
    </TBODY>
  </TABLE>
</TD>


WebParts.js
    function WebPartMenu_OnClick() {
    var a = window.event.srcElement.__menu;
    if (typeof a != "undefined" && a != null) {
        cancelEvent(window.event);
        a.Show()
    }
}

function WebPartMenu_Show() {
    if (typeof __wpm.menu != "undefined" && __wpm.menu != null) __wpm.menu.Hide();
    var e = "<html><head><style>" + "a.menuItem,a.menuItem:Link { display: block; padding: 1px; text-decoration: none; " + this.itemStyle + " }" + "a.menuItem:Hover { " + this.itemHoverStyle + " }" + '</style><body scroll="no" style="border: none; margin: 0; padding: 0;" ondragstart="window.event.returnValue=false;" onclick="popup.hide()">' + this.menuElement.innerHTML + "<body></html>",b = 16,c = 16;
    this.popup = window.createPopup();
    __wpm.menu = this;
    var d = this.popup.document;
    d.write(e);
    this.popup.show(0,b,c);
    var a = d.body;
    b = a.scrollWidth;
    c = a.scrollHeight;
    if (b < this.menuLabelElement.offsetWidth) b = this.menuLabelElement.offsetWidth + 16;
    if (this.menuElement.innerHTML.indexOf("progid:DXImageTransform.Microsoft.Shadow") != -1) a.style.paddingRight = "4px";
    a.__wpm = __wpm;
    a.__wpmDeleteWarning = __wpmDeleteWarning;
    a.__wpmCloseProviderWarning = __wpmCloseProviderWarning;
    a.popup = this.popup;
    this.popup.hide();
    this.popup.show(0,this.menuLabelElement.offsetHeight,c,this.menuLabelElement)
}

解决方法

确实是createPopup方法可以解决问题.它是Internet Explorer中的专有方法.

http://msdn.microsoft.com/en-us/library/ms536392%28VS.85%29.aspx.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


这篇文章主要讲解了“WPF如何实现带筛选功能的DataGrid”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“WPF...
本篇内容介绍了“基于WPF如何实现3D画廊动画效果”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这...
Some samples are below for ASP.Net web form controls:(from http://www.visualize.uk.com/resources/asp
问题描述: 对于未定义为 System.String 的列,唯一有效的值是(引发异常)。 For columns not defined as System.String, the only vali
最近用到了CalendarExtender,结果不知道为什么发生了错位,如图在Google和百度上找了很久,中文的文章里面似乎只提到了如何本地化(就是显示中文的月份)以及怎么解决被下拉框挡住的问题,谈
ASP.NET 2.0 page lifecyle ASP.NET 2.0 event sequence changed a lot since 1.1. Here is the order: App
静态声明: &#39; Style=&quot;position: relative&quot; AppendDataBoundItems=&quot;True&quot;&gt; (无 或 空 或
以下内容是从网络上搜集资料,然后整理而来的。不当之处,请不吝指教。(The following were from network, and edited by myself. Thanks in a
Imports System Imports System.Reflection Namespace DotNetNuke &#39;*********************************
Ok so you have all seen them: “8 million tools for web development”, “5 gagillion tools that if you
以下内容来源于: http://blog.csdn.net/cuike519/archive/2005/09/27/490316.aspx 问:为什么Session在有些机器上偶尔会丢失? 答:可能和
以下文章提到可以用“http://localhost/MyWebApp/WebAdmin.axd”管理站点: ---------------------------------------------
Visual Studio 2005 IDE相关的11个提高开发效率的技巧 英文原创来源于: http://www.chinhdo.com/chinh/blog/20070920/top-11-vis
C#日期格式化 from: http://51xingfu.blog.51cto.com/219185/46222 日期转化一 为了达到不同的显示效果有时,我们需要对时间进行转化,默认格式为:2007
from: http://www.nikhilk.net/UpdateControls.aspx Two controls that go along with the UpdatePanel and
Open the report in the Designer. In the ToolBox, select/expand the &quot;Report Items&quot; section.
from: http://drupal.org/node/75844 Do this: find which TinyMCE theme you are using. For the sake of
asp.net中给用户控件添加自定义事件 用户控件中定义好代理和事件: public delegate void ItemSavedDelegate(object sender, EventArgs
在Windows版本的Safari中浏览以下的页面。 http://www.asp.net/AJAX/Control-Toolkit/Live/Calendar/Calendar.aspx Calen
http://aspnet.4guysfromrolla.com/articles/021506-1.aspx By Scott Mitchell Introduction When creating