库升汽车网
您的当前位置:首页Jquery实现的一种常用高亮效果示例代码_jquery

Jquery实现的一种常用高亮效果示例代码_jquery

来源:库升汽车网


如下所示:
代码如下:


jquery


$(document).ready(function(){
var oInputs = $("ul.demo input");

oInputs.each(function(i){
oInputs.eq(i).focus(function(){
oInputs.eq(i).parent().css("background-color","ccf");
}).blur(function(){
oInputs.parent().css("background-color","");
})
});


oInputs.focus(function(){
$(this).css("background-color","ff9").blur(function(){
$(this).css("background-color","");
});
})
})






  • 注册选项


  • 用户名:

  • 密 码:

  • 爱 好:篮球 足球 type="checkbox" value="" />音乐





  • 显示全文