https://github.com/nuintun/jquery-qrcode
A javascript qrcode
https://github.com/nuintun/jquery-qrcode
Last synced: about 1 year ago
JSON representation
A javascript qrcode
- Host: GitHub
- URL: https://github.com/nuintun/jquery-qrcode
- Owner: nuintun
- Created: 2013-11-29T03:45:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-04-21T02:14:58.000Z (about 9 years ago)
- Last Synced: 2023-04-05T13:38:01.156Z (about 3 years ago)
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jquery-qrcode
>a javascript qrcode
### Introduction
```js
$('#qrcode').qrcode({
render: 'auto', // 默认auto,可选auto、canvas、svg、vml
text: 'QRCode', // 编码内容
width: 300, // 二维码宽度,默认256
height: 300, // 二维码高度,默认256
version: -1, // 二维码版本,-1为自动,可选1-40以下数字(包括1和40),小于零等同于-1
ecLevel: 'H', // 纠错级别,默认H,可选H、Q、M、L(区分大小写)
mode: 'EightBit', // 编码模式,默认EightBit,可选EightBit、AlphaNumeric、Numeric(区分大小写)
background: '#ffffff', // 背景色,默认白色,可选任何颜色
foreground: '#000000', // 前景色,默认黑色,可选任何颜色
onError: function (e){
alert(e.message);
} // 编码错误回调函数
});
```