getelementbyclassname instead of getelementbyid is not working
问题 I have read many times that you can NOW get getElementsByClassName. This below works fine IF I replace ClassName by Id, but using the word ClassName does not work. Anyone know why? (I tried on Chrome and Firefox) <script type="text/javascript"> function makeDisable(){ var x=document.getElementsByClassName("mySelect"); x.disabled=true } function makeEnable(){ var x=document.getElementsByClassName("mySelect"); x.disabled=false } </script> <form> <select class="mySelect" id="mySelect"> <option