One issue I am facing is that even after removing the numbers from the textboxes, the submit button remains enabled. Initially, when I enter inputs in the textbox, it enables the button, but even after removing a number, the button stays enabled.
This is the code snippet for my button. The textboxes have been assigned the ids "digit" and "digit1".
if ((document.getElementById("digit").value > 0) && (document.getElementById("digit1").value > 0)) {
rand.removeAttribute('disabled');
} else {
rand.setAttribute('disabled', 'disabled');
}
<input id="rand" type="submit" value="Submit" disabled>