disable input with Jquery


/ Published in: jQuery
Save to your folder(s)

simply disable an input (type=text) using Jquery.


Copy this code and paste it in your HTML
  1. //jQuery < 1.6
  2. jQuery('input[name=name_of_the_input]').attr('disabled',true)
  3.  
  4. //jQuery >= 1.6
  5. jQuery('input[name=name_of_the_input]').prop('disabled',true)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.