js生成二维码、条形码
QRCode.js 生成二维码
中文文档:http://code.ciaoca.com/javascript/qrcode/
http://github.com/davidshimjs/qrcodejs
jquery-barcode.js 生成条形码
http://www.cnblogs.com/yjmyzz/p/jquery-barcode.html
http://barcode-coder.com/en/barcode-jquery-plugin-201.html
<script>
var barcodeSettings = {
output:'css', //可选值:css/bmp/svg/canvas(后三种在IE9以下无效)
bgColor: '#ffffff', //背景色
color: '#000000', //前景色
barWidth: 2, //每单元宽度
barHeight: 50, //条码高度,对二维条码无效
moduleSize: 5, //仅类型为datamatrix(二维条码)时有效
posX: 5, //output=canvas时有效
posY: 5, //output=canvas时有效
addQuietZone: 1 //仅类型为datamatrix(二维条码)时有效
},
type='code39', //码制,可选值:ean8/ean1/upc/std25/int25/code11/code39/code93/code128/codebar/msi/datamatrix
str='0123456789'; //条码内容
$("#barcode").html("").show().barcode(str, type, barcodeSettings);
</script>
