Remove readonly attribute jquery

Today, We want to share with you remove readonly attribute jquery.In this post we will show you how to get value of readonly textbox in jquery, hear for remove readonly attributes from multiple fields on clicking button in jquery we will give you demo and example for implement.In this post, we will learn about Star Rating System Using JQuery with an example.

How to remove readonly attribute to an input box jquery?

$('#id').removeAttr('readonly');

// or
$('#id').attr('readonly', false);

Free Live Chat for Any Issue

Example 1:

<html>
<head>
<title>jQuery Example - www.pakainfo.com</title>
   <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
   <script>
      $(document).ready(function() {
         $('input[type="text"], textarea').each(function(){
            $(this).attr('readonly','readonly');
         });
      });

   </script>
</head>
<body>
<form>
<input type="text" value="readonly text field" /><br>
<textarea>readonly textarea</textarea>
</form>
</body>
</html>

I hope you get an idea about remove disabled attribute jquery.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Also Read This πŸ‘‰   PHP Laravel Join with subquery Query Builder