我遇到了 IE 中出现两个中断 < Br/> 的问题,
如果我有一个像这样的正常休息
<wcl:GridView ....... />
<br />
<wcl:Button runat="server" ID="btnAddAnotherQuote" OnClientClick='AddDeliveryQuote(this);return false;' />
<wcl:HelpDialog runat="server" ID="hdDeliveryQuotes" />
然后它在 Firefox 和 IE 中显示正常。 但如果我这样做:
<br runat="server" id="brAddAnotherQuote" />
<wcl:Button runat="server" ID="btnAddAnotherQuote" OnClientClick='AddDeliveryQuote(this);return false;' />
<wcl:HelpDialog runat="server" ID="hdDeliveryQuotes" />
然后查看IE的源代码,它产生了两个
其中一个 ID 为 brAddAnotherQuote,其下有一个简单的“< br/>”
这在 Firefox 中不会发生
这可能是什么原因造成的?
最佳答案
为什么不尝试类似以下内容来代替服务器端 br 标记。
<asp:Literal runat="server" id="brAddAnotherQuote" Text="<br />"></asp:Literal>
关于html - IE 复制服务器端中断 <br>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4096499/