下面jQuery方法中,能够获取到匹配元素的父元素的方法的是
A. children()
B. siblings()
C. parent()
D. next()
查看答案
在jQuery中,事件触发方式不包括
A. 使用普通事件方法触发事件
B. 使用trigger()方法触发事件
C. 使用triggerHandler()方法触发事件
D. on()方法触发事件
jQuery事件冒泡行为中,阻止页面中span元素的事件冒泡行为,下面代码正确的是
A. $('span').click(function() { console.log('span元素被单击了'); return ;});
B. $('span').click(function() { console.log('span元素被单击了'); false;});
C. $('span').click(function() { console.log('span元素被单击了'); return false;});
D. $('span').click(function() { console.log('span元素被单击了'); stop;});
下面代码中,给input框添加获取焦点事件并在事件处理函数中给input框添加背景色的是
A. $("input").focus(function(){ $(this).css("border","1px solid red") })
B. $("input").focus(function(){ $(this).css("background-color","red") })
C. $("input").blur(function(){ $(this).css("bacground-color","red") })
D. $("button").onfocus(function(){ $(this).css("background-color","red") })
jQuery中同一个事件处理函数来处理多个事件,可以使用()属性来获取事件类型。
A. pageX/Y
B. target
C. keyCode
D. type