弄成下面这样就不会错了:
window.onload=function(){ var list_li = document.getElementById('list-banner').getElementsByTagName('li'); //...其他代码自己加... }