<!DOCTYPE html>
<html>
<head>
<title></title>
<script language="JavaScript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js">
</script>
</head>
<body onload="">
<script>
function check() {
if ($('#input1').val() != '' && $('#input2').val() != '')
$('#button').removeAttr('disabled');
else
$('#button').attr('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;
}
}
</script>
<input onkeyup="check2()" id="input1" type="text">
<input onkeyup="check2()" id="input2" type="text">
<button disabled id="button">wefwf</button>
</body>
</html>