enabling submit button if text entered


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



Copy this code and paste it in your HTML
  1. $('#username').keyup(function() {
  2. $('#submit').attr('disabled', !$('#username').val());
  3. });

URL: http://cakebaker.42dh.com/2009/01/13/enabling-submit-button-if-text-entered/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.