- 1 2
- 3
- 11
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 1213 14 varli=document.getElementsByTagName('li');
- 15 for(vari=0;i){
- 16li[i].addEventListener('mouseover',function () {
- 17 this.style.background='red';
- 18 });
- 19li[i].addEventListener('mouseout',function () {
- 20 this.style.background='none';
- 21 });
- 22 };
- 23 varlast=document.getElementById('last');
- 24last.style.height=90+'px';
- 25last.style.background='green';
- 2627
来源: http://www.bubuko.com/infodetail-2041101.html