Form Focus

联合创作 · 2023-10-02 14:41

This plugin allows you to specify the form element on which the initial focus should be set

  • Only sets the focus if the user is yet to type anything into the form field
  • Also supports setting the focus on select elements, radio buttons and checkboxes as well as buttons

Using it is as simple as calling:

$('form > input:first').formFocus();

Please note: jQuery selectors that return more than one element are not supported as only one element can receive the keyboard focus at a time.

浏览 2
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报