题目内容

【单选题】有如下HTMl文档:Document
父div盒子
子div盒子当在div#inner元素上用鼠标单击时,弹出的消息框有几个?()

A. 1
B. 2
C. 3
D. 6

查看答案
更多问题

【单选题】在一个html文档中,注册了三个键盘事件:用浏览器打开该文档后,在键盘上任意按下一个键,事件触发的顺序下面哪一个正确?。

A. onkeydownonkeyuponkeypress
B. onkeyuponkeydowonkeypress
C. onkeypressonkeydownonkeyup
D. onkeypressonkeyuponkeydown

【单选题】事件委托利用的是下面哪个原理?

A. 事件驱动
B. 事件绑定
C. 事件捕获
D. 事件冒泡

【多选题】下面html页面代码的功能是实现点击一个列表项时该列表项的背景颜色变成红色,划线的空白处可以填的选项有哪些?()Document
  • 第1项
  • 第2项
  • 第3项
  • 第4项

A. selectedLi
B. arguments[0]
C. arguments
D. event.target
E. this

【多选题】下面是通过在JavaScript中设置事件属性的写法来实现点击一个列表项时该列表项的背景颜色变成红色,脚本代码中for循环的循环体部分可以使用的选项有哪些?()Document
  • 第1项
  • 第2项
  • 第3项
  • 第4项

A. lis[i].onclick=function(){this.style.backgroundColor="red";};
B. lis[i].onclick=function(){lis[i].style.backgroundColor="red";};
C. lis[i].onclick=function(e){e.target.style.backgroundColor="red";};
D. lis[i].onclick=function(e){e.currentTarget.style.backgroundColor="red";};
E. lis[i].onclick=function(){event.target.style.backgroundColor="red";};

答案查题题库