将页面中的所有元素设置为只读

<script>
$(document).ready(function(){
    $("input").attr('readonly', true);
    $("textarea").attr('readonly', true);
    $(':radio').attr('disabled', true);
    $(':checkbox').attr('disabled', true);
    $(':button').attr('disabled', true);
    $('a').removeAttr('onclick');
    $('select').attr('disabled', true);
});
</script>

 

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-07-15
  • 2021-08-18
  • 2022-03-03
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
  • 2021-11-17
  • 2021-09-05
  • 2021-04-30
相关资源
相似解决方案