这一个有效,它显示了表格:当我输入 .style.display = "tablerow" 时,该函数有效var getMain = document.getElementById("main").style.display = "table-row";var getLocalStorage = localStorage.hasOwnProperty('tableFill');for (i = 0; i < getLocalStorage.lenght; i++) { if (getLocalStorage[i]){ getMain; 但是当我把它放在 for 循环中时它不再工作了,但我在控制台中也没有得到任何错误......var getMain = document.getElementById("main");var getLocalStorage = localStorage.hasOwnProperty('tableFill');for (i = 0; i < getLocalStorage.lenght; i++) { if (getLocalStorage[i]){ getMain.style.display = "table-row";
添加回答
举报
0/150
提交
取消