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);
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.
I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.