jQuery <1.9
$('#inputId').attr('readonly', true);

jQuery 1.9+
$('#inputId').prop('readonly', true);

Read more about difference between prop and attr

相关文章:

  • 2021-10-25
  • 2021-12-26
  • 2021-09-20
  • 2021-06-26
  • 2022-03-07
  • 2022-12-23
  • 2021-12-28
  • 2021-07-26
猜你喜欢
  • 2022-01-17
  • 2021-09-06
  • 2021-09-05
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案