【发布时间】:2010-10-20 00:20:51
【问题描述】:
以下内容在 Chrome 中运行良好。
<asp:LinkButton runat="server" ID="lbEdit" OnClick="lbEdit_Click">
<button type="button" class="edit">
Edit
</button>
</asp:LinkButton>
这是按钮及其子类的 CSS。
button
{
padding: 3px;
}
button.edit
{
background:#3f6096;
border:none;
font:10px verdana;
color:#fff;
width:71px;
margin-top:3px;
}
如您所见,没什么特别的;只有颜色和美丽的东西。
我单击蓝色的编辑按钮,它会很好地触发 OnClick 回发......在 Chrome 中!
但是如果我在 IE8 中做同样的事情,它什么也不做;甚至没有检测到点击。
为了帮助查明问题,我删除了标签,只保留了“编辑”这个词,它在 IE8 中作为一个简单的带下划线的链接可以正常工作;回发触发。
那么,为什么 IE8 不能接受 LinkButton 中的任何内容?
【问题讨论】:
标签: asp.net internet-explorer google-chrome onclick asplinkbutton