jQuery中,能够实现当鼠标单击class值为comment下的里元素时设置属性“light=on”的代码是
A. $('.comment>li').mouseover(function() {$(this).attr('light', 'on')});
B. $('.comment>li').click(function() {$(this).attr('light', 'on')});
C. $('.comment>li').click(function() {$(this).css('light', 'on')});
D. $('.comment>li').click(function() {$(this).attribute('light', 'on')});
查看答案
jQuery事件冒泡中,阻止事件冒泡的方式中,event.stopPropagation()可以用( )语句来替换。
A. stop()
B. offPropagation()
C. return false
D. return
解除ul上被委托的click事件,下面示例代码中正确的是
A. $('ul').undelegate('click', '**');
B. $('ul').unbind('click', '**');
C. $('ul').off('click', '**');
D. $('ul').delegate('click', '**');
在鼠标事件中,松开鼠标时触发的事件是
A. click()
B. mouseup()
C. mousedown()
D. mouseout()
jQuery中设置表单元素的值中,清空表单元素文本框内容的方法正确的是
A. val("")
B. value("")
C. clear()
D. val("true")