javascript enable a button once an input text filled

Solutions on MaxInterview for javascript enable a button once an input text filled by the best coders in the world

showing results for - "javascript enable a button once an input text filled"
Caius
04 Jul 2020
1document.getElementById("name").addEventListener("keyup", function() {
2    var nameInput = document.getElementById('name').value;
3    if (nameInput != "") {
4        document.getElementById('send').removeAttribute("disabled");
5    } else {
6        document.getElementById('send').setAttribute("disabled", null);
7    }
8});
9