【问题标题】:Getting buttons element to work with Internet Explorer 11让按钮元素与 Internet Explorer 11 一起使用
【发布时间】:2015-10-11 16:06:54
【问题描述】:

以下测试代码适用于除 Internet Explorer 11 以外的所有浏览器:

<button type="button" id="index_next" class="button_next" onclick="alert(this.id);" >Next</button>

我创建了一个 jsfiddle here

请帮忙。我如何使它适用于 IE11。

谢谢

【问题讨论】:

  • 我看到了按钮渲染的问题(仅在 IE11 中)。问题是在呈现的代码中, type="button" 属性以某种方式移动到了标记的末尾。通过编辑为 HTML 并将属性移回标记的开头(即 -

标签: button internet-explorer-11


【解决方案1】:

谢谢达拉斯。我已经使用

解决了
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

这创造了与其他浏览器的一定程度的兼容性,但在使用 IE11 时遇到了其他功能(如 websockets)的奇怪行为。非常感谢你的回复。

【讨论】:

  • 请不要使用Thank youMe tooAdditional Questions等cmets的回答功能。
猜你喜欢
  • 2016-06-19
  • 2015-10-19
  • 2016-01-23
  • 2014-02-11
  • 1970-01-01
  • 1970-01-01
  • 2012-03-26
  • 2023-03-31
  • 1970-01-01
相关资源
最近更新 更多