php select disable submit no value

41

$(document).ready(function() {
     $("#names").change(function () {
          var str = "";
          if ($("#names option:selected").val()=='')
            {

                $('#jsbutton').attr('disabled', 'disabled');  
            }
            else
            {

                $('#jsbutton').removeAttr('disabled');
            }
        });
});

Comments

Submit
0 Comments