题目内容

下面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";};

下面html文档中的JS脚本代码是利用事件委托机制来实现点击列表项后该列表项的背景颜色变成红色,包括通过点击添加按钮后新增的列表项:Document代码中if语句的作中划线处的判断条件可以使用下面哪些?

A. e.target.tagName=="LI"
B. e.target.nodeName=='LI'
C. e.target.className=='item'
D. e.target.getAttribute('class')=='item'
E. event.target.tagName="LI"

有如下代码:河南科技大学下面哪些写法可以实现单击超链接会弹出对话框,但不会跳转到河南科技大学页面。

A. 河南科技大学
B. 河南科技大学
C. 河南科技大学
D. 河南科技大学
E. 河南科技大学

能使至少一人的境况变好而没有其他人的境况变坏的资源重新配置被称为()

A. 边际效用递减
B. 免费搭车现象
C. 帕累托改进
D. 帕累托最优

答案查题题库