1.0.12 • Published 1 year ago

codeimg_js v1.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

CodeImg

A lightweight and versatile JavaScript plugin designed to automatically generate random verification codes (commonly known as captchas) for enhanced security in web forms and user authentication processes. It allows customization of code length, character set (including alphanumeric, special characters), and expiration time, ensuring seamless integration into various web applications.

Install(安装)

npm install codeimg_js
yarn add codeimg_js

How to use?(使用说明)

var codeImg = new CodeImg(options);
const code = codeImg.getData();  // 获取验证码
console.log(code);  // [ '1', '2', '3', '4', '5' ]

Available options are:
可配置项如下: | Name | Parameter | Remark | | -------- | :----------------------: | ----------------------------------------------------: | | container | HTML DOM element | dom 元素 | | num | 5 | 验证码个数 | | iconum | 10 | 背景斑点个数 | | changeBtn | HTML DOM element | DOM 元素数组 点击刷新验证码 | | width | 160 | 容器大小 | | height | 40 | 容器大小 | | background| #ccc | 容器背景色| | fontSize | 14 | 字体大小 | | cimgRefresh| true | 是否点击验证码图片后刷新验证码

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago