input readonly模式下在ie跟火狐访问的时候会有光标会出现,以下方法可解决这个问题

<input type="text" readonly unselectable='on' onfocus="this.blur()">

1.unselectable='on' 是解决ie下光标出现的问题

2.onfocus="this.blur() 是解决火狐下光标出现的问题,也可以写成全局的

$(document).on('focus', 'input[readonly]', function () {
            this.blur();
 })

这样问题就解决了

相关文章:

  • 2021-12-07
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-10-12
  • 2022-12-23
相关资源
相似解决方案