JQuery设置文本框和密码框得到焦点时的样式


复制代码 代码如下:

//设置文本框和密码框得到焦点时的样式
$("#tblReg input[type=text],#tblReg input[type=password]").focus(function () {
$(this).addClass("myFocus");
}).blur(function () {
$(this).removeClass("myFocus");
});

注意中间用逗号隔开
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3