我有這樣的事情財產「風格」,但我不明白問題出在哪裏。控制檯說 - Cannot read property 'style' of undefined
無法讀取的不確定
<div class="price-table-box"></div>
<div class="price-table-box"></div>
<div class="price-table-box"></div>
<div class="price-table-box"></div>
var table = document.getElementsByClassName('price-table-box');
for (var i = 0; i <= table.length; i++) {
table[i].style.display = 'none';
}
謝謝,我忘了,在編程一切從0開始。 – Wizard