js条形码插件JsBarcode

下载地址:https://github.com/lindell/JsBarcode

使用方法:

1、引入相关js

<script src="js/jquery.min.js"></script>
<script src="js/JsBarcode.all.js" type="text/javascript" charset="utf-8"></script>

2、html

<img id="ordercode" />

3、js

JsBarcode("#ordercode", 'verifycode',{format: "CODE39",width:2,height:50,fontSize:24});
//or
$("#ordercode").JsBarcode("verifycode");	

详细参数:

https://github.com/lindell/JsBarcode/wiki/Options

猜你喜欢

转载自blog.csdn.net/LLL_liuhui/article/details/83656633