最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
jquery修改css样式函数
时间:2010-11-02 编辑:简简单单 来源:一聚教程网
下面提供一款jquery修改css样式函数,他可以修改text password submit reset button radio textarea checkbox file以及focus blur 事件等。
*/
$(document).ready(function(){
$("input[type='text']").addclass('input_blur');
$("input[type='password']").addclass('input_blur');
$("input[type='submit']").addclass('button_style');
$("input[type='reset']").addclass('button_style');
$("input[type='button']").addclass('button_style');
$("input[type='radio']").addclass('radio_style');
$("input[type='checkbox']").addclass('checkbox_style');
$("input[type='textarea']").addclass('textarea_style');
$("input[type='file']").addclass('file_style');
$("input[type='file']").blur(function () { this.classname='input_blur'; } );
$("input[type='file']").focus(function () { this.classname='input_focus'; } );
$("input[type='password']").blur(function () { this.classname='input_blur'; } );
$("input[type='password']").focus(function () { this.classname='input_focus'; } );
$("input[type='text']").blur(function () { this.classname='input_blur'; } );
$("input[type='text']").focus(function () { this.classname='input_focus'; } );
$("textarea").blur(function () { this.classname='textarea_style'; } );
$("textarea").focus(function () { this.classname='textarea_focus'; } )
$(".table_list tr").mouseo教程ver(function () { this.classname='mouseover'; } );
$(".table_list tr").mouseout(function () { this.classname=''; } );
$(".inputtitle").focus(function () { this.classname='inputtitle'; } );
$(".inputtitle").blur(function () { this.classname='inputtitle'; } );
});
-
上一个: js 获取url与url参数
-
下一个: js 动态添加创建 iframe
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31