I'm trying to disables inputs with the name "q1"
, however It just doesn't disable them.
The line of code is just
if (time < 0){
document.getElementById("lose").innerHTML = "O tempo acabou!";
document.getElementById("nextQuestion").style.display = "block"
document.getElementsByName("q1").disabled = true
}
The other document.getElementById
work.
The html is
<br><br><input type="submit" name="q1" value="arroz">
<input type="submit" name="q1" value="massa"><br><br>
<input type="submit" name="q1" value="Apanhado em flagrante">
<input type="submit" name="q1" value="batata de tremoços"><br><br><br>`