Javascript Ajax jQuery Html PHP Example Quiz New MORE
Need a Website Or Web Application.Contact : +91 9437911966 (Whatsapp) Note: Paid Service

How to add readonly attribute to an input box jquery


			Add a readonly attribute to an input field 
		<script src = 
	<body style = "text-align:center;"> 
		<p style = "font-size: 15px; font-weight: bold;"> 
			Click on the button to add the readonly attribute.
		<form> Name: <input type="text" name="input_field" /> 
		<button id="submit"> 
			click here 
		<p id = "GFG_down" style = 
			"color: green; font-size: 20px; font-weight: bold;"> 
			 $('input').attr('readonly', true); 
                        = "Read-Only attribute enabled"; 
Run it Yourself »