我是学习JavaScript的两天,我无法让脚本运行,任何更正?ECMAScript没有运行
const list = document.getElementsByTagName("li");
for (let i = 0; i < list.length; i += 1) {
list[i].addEventListener("mouseover",() => {
list[i].textcontent = list[i].textcontent.toUppercase;
});
list[i].addEventListener("mouseout",() => {
list[i].textcontent = list[i].textcontent.toLowercase;
});
}
@AdamMcquiff代码应该** **这里,可能在堆叠片段。 – Pointy
@Pointy cool ... – AdamMcquiff
也许这些文章可以帮助你提出更好的问题:) [如何问一个好问题](http://stackoverflow.com/help/how-to-ask)和[你有什么试过](http://mattgemmell.com/what-have-you-tried/) –