kwj

走越远,路越艰!

常用链接

统计

最新评论

jquery实现表单onfocus,onblur效果

<script>
    $("document").ready(function(){
        $("input[@type='text'],input[@type='password'],textarea").focus(function(){
            $(this).css({background:"#fcc", border:"1px solid #f00"}).blur(function(){
                $(this).css({background:"transparent", border: "1px solid #ccc"})
            })
        });
    });
  </script>

$(document).ready(function(){
if ($.browser.msie){
  $("input[@type='text'], input[@type='password'], textarea").focus(function(){$(this).addClass("focus")}).blur(function(){$(this).removeClass("focus")});
}
})

posted on 2008-04-02 14:50 木剑 阅读(23575) 评论(6)  编辑  收藏 所属分类: js

评论

# re: jquery实现表单onfocus,onblur效果 2011-05-21 11:24 liaojingui

ffffgdfggfgfgfg  回复  更多评论   

# re: jquery实现表单onfocus,onblur效果 2011-09-13 20:18 gdfgdg

gfgdg  回复  更多评论   

# re: jquery实现表单onfocus,onblur效果 2013-01-30 10:46 www

1111  回复  更多评论   

# re: jquery实现表单onfocus,onblur效果3 2013-12-12 19:27 e

dseewew  回复  更多评论   

#  2014-08-13 09:55 q

weqe  回复  更多评论   

# re: jquery实现表单onfocus,onblur效果 2016-07-07 16:20 qewe

qeweqw  回复  更多评论