webcito/jquery-typing-events 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webcito/jquery-typing-events

Composer 安装命令:

composer require webcito/jquery-typing-events

包简介

The jQuery plugin simplifies the events that take place in an input field. The default properties are not overwritten.

README 文档

README

The jQuery plugin simplifies the events that take place in an input field. The default properties are not overwritten.

options

name type default description
delay int 400 The time in milliseconds after the last keystroke was made and the event typingEnd is triggered.
allowedKeys array [] A list for allowed keys (e.g. ['a','b',..])
preventedKeys array [] A list for forbidden keys (e.g. ['a','b',..])
trim string ".,|]\\^" Characters that are trimmed from the input after the event typingEnd (except for password fields).
onKeyDown function (event, key, allowed) => {} The function is triggered with each keystroke.
onKeyUp function (key) => {} The function is triggered each time a keystroke is released.
onPrevented function (key) => {} The function is triggered when the keystroke is not allowed.
onTypingStart function () => {} The function is triggered when an input starts.
onTypingEnd function (value) => {} The function is triggered when an input ends (measured by the delay property).

events

event params
key.any e, key, allowed Triggered with each keystroke.
kex.A
key.a
key.B
key.b
key.Shift
...
e, key, allowed Triggered on each specific keystroke.
key.prevented e, key Triggered on each forbidden keystroke.
typingStart e Triggered at the start of the input.
typingEnd e, value (trimmed) Triggered at the end of the input (measured by the `delay property).

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-09-13