后台-插件-广告管理-内容页广告位一(手机)

您现在的位置是:首页 > 开发类 > 问答问答

Ext在IE7中的一个奇怪问题

2021-07-06 20:25:51问答人已围观

简介 <P>最近在学习ext,发现在IE7下面使用iframe时有个奇怪的问题。</P><P>有两个页面,</P><P>a.aspx,使用Ext做的一个页面,里面有个grid,单独浏览正常。代码如下:</P><P>

<P>最近在学习ext,发现在IE7下面使用iframe时有个奇怪的问题。</P><P>有两个页面,</P><P>a.aspx,使用Ext做的一个页面,里面有个grid,单独浏览正常。代码如下:</P><P><DIV class="cnblogs_code"><IMG id="Code_Closed_Image_153825" onclick="this.style.display='none'; Code_Closed_Text_153825.style.display='none'; Code_Open_Image_153825.style.display='inline'; Code_Open_Text_153825.style.display='inline';" height="16" src="/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top"><IMG id="Code_Open_Image_153825" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_153825.style.display='none'; Code_Closed_Image_153825.style.display='inline'; Code_Closed_Text_153825.style.display='inline';" height="16" src="/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"><SPAN id="Code_Closed_Text_153825" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Code</SPAN><SPAN id="Code_Open_Text_153825" style="DISPLAY: none"><BR><SPAN style="color: #008080;"> 1</SPAN> <SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">html </SPAN><SPAN style="color: #FF0000;">xmlns</SPAN><SPAN style="color: #0000FF;">="http://www.w3.org/1999/xhtml"</SPAN><SPAN style="color: #FF0000;"> </SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 2</SPAN> <SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">head </SPAN><SPAN style="color: #FF0000;">runat</SPAN><SPAN style="color: #0000FF;">="server"</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 3</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">title</SPAN><SPAN style="color: #0000FF;">&gt;&lt;/</SPAN><SPAN style="color: #800000;">title</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 4</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">link </SPAN><SPAN style="color: #FF0000;">rel</SPAN><SPAN style="color: #0000FF;">="stylesheet"</SPAN><SPAN style="color: #FF0000;"> type</SPAN><SPAN style="color: #0000FF;">="text/css"</SPAN><SPAN style="color: #FF0000;"> href</SPAN><SPAN style="color: #0000FF;">="resources/css/ext-all.css"</SPAN><SPAN style="color: #FF0000;"> </SPAN><SPAN style="color: #0000FF;">/&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 5</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">script </SPAN><SPAN style="color: #FF0000;">type</SPAN><SPAN style="color: #0000FF;">="text/javascript"</SPAN><SPAN style="color: #FF0000;"> src</SPAN><SPAN style="color: #0000FF;">="adapter/ext/ext-base.js"</SPAN><SPAN style="color: #0000FF;">&gt;&lt;/</SPAN><SPAN style="color: #800000;">script</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 6</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">script </SPAN><SPAN style="color: #FF0000;">type</SPAN><SPAN style="color: #0000FF;">="text/javascript"</SPAN><SPAN style="color: #FF0000;"> src</SPAN><SPAN style="color: #0000FF;">="ext-all.js"</SPAN><SPAN style="color: #0000FF;">&gt;&lt;/</SPAN><SPAN style="color: #800000;">script</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 7</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">script </SPAN><SPAN style="color: #FF0000;">type</SPAN><SPAN style="color: #0000FF;">="text/javascript"</SPAN><SPAN style="color: #FF0000;"> src</SPAN><SPAN style="color: #0000FF;">="js/demo4.js"</SPAN><SPAN style="color: #FF0000;"> charset</SPAN><SPAN style="color: #0000FF;">="gb2312"</SPAN><SPAN style="color: #0000FF;">&gt;&lt;/</SPAN><SPAN style="color: #800000;">script</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;">    <BR></SPAN><SPAN style="color: #008080;"> 8</SPAN> <SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">head</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 9</SPAN> <SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">body</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">10</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">form </SPAN><SPAN style="color: #FF0000;">id</SPAN><SPAN style="color: #0000FF;">="form1"</SPAN><SPAN style="color: #FF0000;"> runat</SPAN><SPAN style="color: #0000FF;">="server"</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">11</SPAN> <SPAN style="color: #000000;">        </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">h1</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;">Demo A</SPAN><SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">h1</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">12</SPAN> <SPAN style="color: #000000;">        </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">div </SPAN><SPAN style="color: #FF0000;">id</SPAN><SPAN style="color: #0000FF;">="page-grid"</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">13</SPAN> <SPAN style="color: #000000;">        </SPAN><SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">div</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">14</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">form</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">15</SPAN> <SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">body</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">16</SPAN> <SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">html</SPAN><SPAN style="color: #0000FF;"></SPAN></SPAN></DIV>脚本如下,<IMG id="Code_Open_Image_153950" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_153950.style.display='none'; Code_Closed_Image_153950.style.display='inline'; Code_Closed_Text_153950.style.display='inline';" height="16" src="/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"></P><P><DIV class="cnblogs_code"><IMG id="Code_Closed_Image_154041" onclick="this.style.display='none'; Code_Closed_Text_154041.style.display='none'; Code_Open_Image_154041.style.display='inline'; Code_Open_Text_154041.style.display='inline';" height="16" src="/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top"><IMG id="Code_Open_Image_154041" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_154041.style.display='none'; Code_Closed_Image_154041.style.display='inline'; Code_Closed_Text_154041.style.display='inline';" height="16" src="/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"><SPAN id="Code_Closed_Text_154041" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Code</SPAN><SPAN id="Code_Open_Text_154041" style="DISPLAY: none"><BR><SPAN style="color: #008080;"> 1</SPAN> <SPAN style="color: #000000;">Ext.onReady(</SPAN><SPAN style="color: #0000FF;">function</SPAN><SPAN style="color: #000000;">(){<BR></SPAN><SPAN style="color: #008080;"> 2</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">var</SPAN><SPAN style="color: #000000;"> myData </SPAN><SPAN style="color: #000000;">=</SPAN><SPAN style="color: #000000;"> [<BR></SPAN><SPAN style="color: #008080;"> 3</SPAN> <SPAN style="color: #000000;">         [</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">张三</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">测试</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">2006-1-1</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">],<BR></SPAN><SPAN style="color: #008080;"> 4</SPAN> <SPAN style="color: #000000;">         [</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">李四</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">测试一</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">2006-5-6</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">],<BR></SPAN><SPAN style="color: #008080;"> 5</SPAN> <SPAN style="color: #000000;">         [</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">王五</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">测试二</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">2007-12-1</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">]<BR></SPAN><SPAN style="color: #008080;"> 6</SPAN> <SPAN style="color: #000000;">    ];<BR></SPAN><SPAN style="color: #008080;"> 7</SPAN> <SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 8</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">var</SPAN><SPAN style="color: #000000;"> ds </SPAN><SPAN style="color: #000000;">=</SPAN><SPAN style="color: #000000;"> </SPAN><SPAN style="color: #0000FF;">new</SPAN><SPAN style="color: #000000;"> Ext.data.Store<BR></SPAN><SPAN style="color: #008080;"> 9</SPAN> <SPAN style="color: #000000;">    ({<BR></SPAN><SPAN style="color: #008080;">10</SPAN> <SPAN style="color: #000000;">        proxy: </SPAN><SPAN style="color: #0000FF;">new</SPAN><SPAN style="color: #000000;"> Ext.data.MemoryProxy(myData),<BR></SPAN><SPAN style="color: #008080;">11</SPAN> <SPAN style="color: #000000;">        reader: </SPAN><SPAN style="color: #0000FF;">new</SPAN><SPAN style="color: #000000;"> Ext.data.ArrayReader({}, [<BR></SPAN><SPAN style="color: #008080;">12</SPAN> <SPAN style="color: #000000;">            {name:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">sender</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">},<BR></SPAN><SPAN style="color: #008080;">13</SPAN> <SPAN style="color: #000000;">            {name:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">title</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">},<BR></SPAN><SPAN style="color: #008080;">14</SPAN> <SPAN style="color: #000000;">            {name:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">sendtime</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">}<BR></SPAN><SPAN style="color: #008080;">15</SPAN> <SPAN style="color: #000000;">        ])<BR></SPAN><SPAN style="color: #008080;">16</SPAN> <SPAN style="color: #000000;">    });    <BR></SPAN><SPAN style="color: #008080;">17</SPAN> <SPAN style="color: #000000;">    ds.load();    <BR></SPAN><SPAN style="color: #008080;">18</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">var</SPAN><SPAN style="color: #000000;"> colModel </SPAN><SPAN style="color: #000000;">=</SPAN><SPAN style="color: #000000;"> </SPAN><SPAN style="color: #0000FF;">new</SPAN><SPAN style="color: #000000;"> Ext.grid.ColumnModel<BR></SPAN><SPAN style="color: #008080;">19</SPAN> <SPAN style="color: #000000;">    ([<BR></SPAN><SPAN style="color: #008080;">20</SPAN> <SPAN style="color: #000000;">        {<BR></SPAN><SPAN style="color: #008080;">21</SPAN> <SPAN style="color: #000000;">        header:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">发送人</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,width:</SPAN><SPAN style="color: #000000;">100</SPAN><SPAN style="color: #000000;">,sortable:</SPAN><SPAN style="color: #0000FF;">true</SPAN><SPAN style="color: #000000;">,dataIndex:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">sender</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">22</SPAN> <SPAN style="color: #000000;">        },<BR></SPAN><SPAN style="color: #008080;">23</SPAN> <SPAN style="color: #000000;">        {id:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">title</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,header:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">标题</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">, width:</SPAN><SPAN style="color: #000000;">100</SPAN><SPAN style="color: #000000;">,sortable:</SPAN><SPAN style="color: #0000FF;">true</SPAN><SPAN style="color: #000000;">,dataIndex:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">title</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">},<BR></SPAN><SPAN style="color: #008080;">24</SPAN> <SPAN style="color: #000000;">        {header:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">发送时间</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,width:</SPAN><SPAN style="color: #000000;">75</SPAN><SPAN style="color: #000000;">,sortable:</SPAN><SPAN style="color: #0000FF;">true</SPAN><SPAN style="color: #000000;">,dataIndex:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">sendtime</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">}<BR></SPAN><SPAN style="color: #008080;">25</SPAN> <SPAN style="color: #000000;">    ]);     <BR></SPAN><SPAN style="color: #008080;">26</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">var</SPAN><SPAN style="color: #000000;"> grid </SPAN><SPAN style="color: #000000;">=</SPAN><SPAN style="color: #000000;"> </SPAN><SPAN style="color: #0000FF;">new</SPAN><SPAN style="color: #000000;"> Ext.grid.GridPanel({<BR></SPAN><SPAN style="color: #008080;">27</SPAN> <SPAN style="color: #000000;">        title:</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">条目列表</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,<BR></SPAN><SPAN style="color: #008080;">28</SPAN> <SPAN style="color: #000000;">        ds: ds,<BR></SPAN><SPAN style="color: #008080;">29</SPAN> <SPAN style="color: #000000;">        cm: colModel,<BR></SPAN><SPAN style="color: #008080;">30</SPAN> <SPAN style="color: #000000;">        autoScroll: </SPAN><SPAN style="color: #0000FF;">true</SPAN><SPAN style="color: #000000;">,<BR></SPAN><SPAN style="color: #008080;">31</SPAN> <SPAN style="color: #000000;">        height:</SPAN><SPAN style="color: #000000;">380</SPAN><SPAN style="color: #000000;">,<BR></SPAN><SPAN style="color: #008080;">32</SPAN> <SPAN style="color: #000000;">        width:</SPAN><SPAN style="color: #000000;">600</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">33</SPAN> <SPAN style="color: #000000;">    });       <BR></SPAN><SPAN style="color: #008080;">34</SPAN> <SPAN style="color: #000000;">   grid.render(</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">page-grid</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">);   <BR></SPAN><SPAN style="color: #008080;">35</SPAN> <SPAN style="color: #000000;">   </SPAN><SPAN style="color: #0000FF;">function</SPAN><SPAN style="color: #000000;"> onItemClick(item){<BR></SPAN><SPAN style="color: #008080;">36</SPAN> <SPAN style="color: #000000;">        Ext.Msg.alert(</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">提示</SPAN><SPAN style="color: #000000;">'</SPAN><SPAN style="color: #000000;">,item.text);<BR></SPAN><SPAN style="color: #008080;">37</SPAN> <SPAN style="color: #000000;">    };<BR></SPAN><SPAN style="color: #008080;">38</SPAN> <SPAN style="color: #000000;">})<BR></SPAN><SPAN style="color: #008080;">39</SPAN></SPAN></DIV>b.aspx,代码如下:</P><P><DIV class="cnblogs_code"><IMG id="Code_Closed_Image_154122" onclick="this.style.display='none'; Code_Closed_Text_154122.style.display='none'; Code_Open_Image_154122.style.display='inline'; Code_Open_Text_154122.style.display='inline';" height="16" src="/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top"><IMG id="Code_Open_Image_154122" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_154122.style.display='none'; Code_Closed_Image_154122.style.display='inline'; Code_Closed_Text_154122.style.display='inline';" height="16" src="/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top"><SPAN id="Code_Closed_Text_154122" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Code</SPAN><SPAN id="Code_Open_Text_154122" style="DISPLAY: none"><BR><SPAN style="color: #008080;"> 1</SPAN> <SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">html </SPAN><SPAN style="color: #FF0000;">xmlns</SPAN><SPAN style="color: #0000FF;">="http://www.w3.org/1999/xhtml"</SPAN><SPAN style="color: #FF0000;"> </SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 2</SPAN> <SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">head </SPAN><SPAN style="color: #FF0000;">runat</SPAN><SPAN style="color: #0000FF;">="server"</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 3</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">title</SPAN><SPAN style="color: #0000FF;">&gt;&lt;/</SPAN><SPAN style="color: #800000;">title</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 4</SPAN> <SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">head</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 5</SPAN> <SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">body</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 6</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">form </SPAN><SPAN style="color: #FF0000;">id</SPAN><SPAN style="color: #0000FF;">="form1"</SPAN><SPAN style="color: #FF0000;"> runat</SPAN><SPAN style="color: #0000FF;">="server"</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 7</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">div</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 8</SPAN> <SPAN style="color: #000000;">        </SPAN><SPAN style="color: #0000FF;">&lt;</SPAN><SPAN style="color: #800000;">iframe </SPAN><SPAN style="color: #FF0000;">id</SPAN><SPAN style="color: #0000FF;">="main"</SPAN><SPAN style="color: #FF0000;"> src</SPAN><SPAN style="color: #0000FF;">="a.aspx"</SPAN><SPAN style="color: #FF0000;"> width</SPAN><SPAN style="color: #0000FF;">="100%"</SPAN><SPAN style="color: #FF0000;"> height</SPAN><SPAN style="color: #0000FF;">="100%"</SPAN><SPAN style="color: #FF0000;"> frameborder</SPAN><SPAN style="color: #0000FF;">="0"</SPAN><SPAN style="color: #FF0000;"> scrolling</SPAN><SPAN style="color: #0000FF;">="auto"</SPAN><SPAN style="color: #0000FF;">&gt;&lt;/</SPAN><SPAN style="color: #800000;">iframe</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;"> 9</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">div</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">10</SPAN> <SPAN style="color: #000000;">    </SPAN><SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">form</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">11</SPAN> <SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">body</SPAN><SPAN style="color: #0000FF;">&gt;</SPAN><SPAN style="color: #000000;"><BR></SPAN><SPAN style="color: #008080;">12</SPAN> <SPAN style="color: #0000FF;">&lt;/</SPAN><SPAN style="color: #800000;">html</SPAN><SPAN style="color: #0000FF;"></SPAN></SPAN></DIV>浏览b.aspx,应该在里面的iframe中显示a.aspx,</P><P>这段代码在Opera下浏览正常,但是在<STRONG><FONT color="#ff0000">IE7</FONT></STRONG>下,却无法显示,提示"null为空“,</P><P>发现出错的代码是脚本中的grid.render('page-grid'),在onReady时,如果页面在Iframe中,page-grid就为空,所以无法显示。</P><P></P><P>请问各位有没有什么好的解决方案。</P>

最佳答案:

文章来源:https://q.cnblogs.com/q/2624/

Tags:网站开发 ajax框架 

很赞哦! ()

后台-插件-广告管理-内容页广告位二(手机)

相关文章

后台-插件-广告管理-内容页广告位三(手机)
后台-插件-广告管理-内容页广告位四(手机)

文章评论

留言与评论(共有 0 条评论)
   
验证码:

本栏推荐

站点信息

  • 文章统计90197篇文章
  • 浏览统计10086次浏览
  • 评论统计1个评论
  • 标签管理标签云
  • 统计数据:统计代码
  • 微信公众号:扫描二维码,关注我们