最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
jquery实现input框获取焦点的简单实例
时间:2022-06-25 17:19:28 编辑:袖梨 来源:一聚教程网
获取表单焦点变色的简单实例
代码如下 | 复制代码 |
orm表单样式类 //.item input输入框父div // focus是要添加的样式类 $(".login-form").on("focus","input",function(){ $(this).closest('.item').addClass('focus'); }).on("blur","input",function(){ $(this).closest('.item').removeClass('focus'); });
//初始化选中用户名输入框 $("#itemBox").find("input[name=username]").focus(); |
相关文章
- 热贡艺术有哪些 蚂蚁新村热贡艺术4月18日答案 04-18
- 热贡艺术包括壁画还是陶艺 04-18
- 白荆回廊4月18日更新公告 04-18
- 支付宝神奇海洋每日科普知识竞赛答案大全 - 2024年4月版 04-18
- LOL手游暗影岛奇幻夜活动什么时候 04-18
- 七日世界火药位置在哪 04-18