(JQuery) all the elements of the page is set to read-only

 

All elements of the page is set to read-only

<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>

 

Guess you like

Origin www.cnblogs.com/jkfeng/p/12482222.html