我们大家都知道onchange有时候很不好用,因为onchange事件是离开焦点后才会被触发,而不是实时去监听!

那么oninput()事件和onpropertychange()完美的解决了问题;(onpropertychange是IE版本的专利)

在jquery中只有IE8和IE8以下的低版本支持:

   Obj.bind("propertychange", function () {});

其他浏览器可用:

   Obj.bind("input", function () {});

而且当页面某元素出现焦点丢失事件onpropertychange会触发

相关文章:

  • 2021-12-31
  • 2022-12-23
  • 2022-02-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案