TypeError: object is not a function
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm developing this webapp for my school. The page is supposed to filter entries by the url parameter "class". This works fine as far as i can tell, but when i try to change the filter it gives "TypeError: object is not a function". What am i doing wrong? <html> <head> <TITLE>Cancelled lessons</TITLE> </head> <body> <script> function filter(text){ text = text.toLowerCase(); for (i=0;i<lessonList.length;i++){ if(lessonList[i].innerHTML.toLowerCase().indexOf(text)==-1){ lessonList[i].style.display = "none"; } else{ lessonList[i].style.display