[Solved] GetElementsByClassName Not Working As Expected [duplicate]


You are using getElementsByClass (it doesn’t exist) and changing property for the whole collection (not valid, you should iterate through Node list to change attribute’s value). You should do something like this :

var n = document.getElementsByClassName('numrooms')
for(var i=0;i<n.length;i++){
   n[i].disabled = true;
}

solved GetElementsByClassName Not Working As Expected [duplicate]