It works - I can't click the button when input #key1 is empty. But I need to use two inputs - #key1 and #key2. To do - When both are empty or 1/2, nobody can't click the button. Thanks!!
<script type='text/javascript' src='http://code.jquery.com/jquery.min.js'></script>
<script type='text/javascript'>
$(function() {
$('#key1').keyup(function() {
if ($(this).val() == '') {
//Check to see if there is any text entered
// If there is no text within the input ten disable the button
$('.enableOnInput').prop('disabled', true);
} else {
//If there is text in the input, then enable the button
$('.enableOnInput').prop('disabled', false);
}
});
});
</script>