<script>
function check() {
if ($('#input1').val() != '' && $('#input2').val() != '')
$('#button').removeAttr('disabled');
else
$('#button').attr('disabled','disable');
}
function check2() {
const input1 = document.getElementById('input1');
const input2 = document.getElementById('input2');
const button = document.getElementById('button');
if (input1.value != '' && input2.value != '') {
button.removeAttribute('disabled');
}
else {
button.getAttribute('disabled', 'disabled');
}
const input1 = document.querySelector('#input1');
const input2 = document.querySelector('#input2');
const button = document.querySelector('#button');
function check2() {
if (input1.value != '' && input2.value != '') {
button.disabled = false;
} else {
button.disabled = true;
}
}
else {
button.getAttribute('disabled', 'disabled');
}
function check2() {
var el = document.querySelectorAll("#input1,#input2,#button");
el[2].disabled = !el[0].value.trim() || !el[1].value.trim();
}