在某场景中一句简单的js: $("#changeOption").text("增加");

在 IE8 下面报错:'意外地调用了方法或属性访问'

改成:$("#changeOption").html("增加");

报同样的错。

改成:document.getElementById('changeOption').innerText="增加";

同样报错:"未知的运行时错误"

最后改成:$("#changeOption").attr('text', "增加"); 才没有报错。

很奇葩,可能是触发了IE8的bug???

相关文章:

  • 2021-07-14
  • 2021-11-30
  • 2021-12-07
  • 2021-06-24
  • 2021-09-08
  • 2021-05-22
  • 2021-08-30
  • 2021-07-29
猜你喜欢
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-02-13
相关资源
相似解决方案