题
我有两个突破<br />出现在IE中的问题,
如果我有一个正常的休息时间
<wcl:GridView ....... />
<br />
<wcl:Button runat="server" ID="btnAddAnotherQuote" OnClientClick='AddDeliveryQuote(this);return false;' />
<wcl:HelpDialog runat="server" ID="hdDeliveryQuotes" />
然后它出现在Firefox中,即很好。但是,如果我这样做:
<br runat="server" id="brAddAnotherQuote" />
<wcl:Button runat="server" ID="btnAddAnotherQuote" OnClientClick='AddDeliveryQuote(this);return false;' />
<wcl:HelpDialog runat="server" ID="hdDeliveryQuotes" />
然后查看IE的源代码,它产生两个
曾经有一个braddanotherquote的ID和一个简单的“ <br />”,这在Firefox中不会发生
是什么造成这一点?
解决方案
您为什么不尝试使用类似服务器端BR标签之类的东西。
<asp:Literal runat="server" id="brAddAnotherQuote" Text="<br />"></asp:Literal>
不隶属于 StackOverflow