Skip to content

Instantly share code, notes, and snippets.

@gunaevart
Created January 9, 2017 12:31
Show Gist options
  • Save gunaevart/454f4a4314d80b9bd0b58769862ae0d5 to your computer and use it in GitHub Desktop.
Save gunaevart/454f4a4314d80b9bd0b58769862ae0d5 to your computer and use it in GitHub Desktop.
ФИО<input id='fio' onkeyup='checkParams()' /><br />
ПОЧТА<input id='email' onkeyup='checkParams()' /><br />
ТЕЛЕФОН<input id='phone' onkeyup='checkParams()' /><br />
<input type='button' id='submit' value='ОТПРАВИТЬ' disabled>
-------------------------------------------------
function checkParams() {
var fio = $('#fio').val();
var email = $('#email').val();
var phone = $('#phone').val();
if(fio.length != 0 && email.length != 0 && phone.length != 0) {
$('#submit').removeAttr('disabled');
} else {
$('#submit').attr('disabled', 'disabled');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment