一、使用

官方地址:http://barcode-coder.com/en/barcode-jquery-plugin-201.html

1.js引用

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery-barcode.js"></script>

2.在页面中显示条码处添加

<div id="bcTarget"></div>   

3.js编码

$("#bcTarget").barcode("1234567890128", "ean13");     

效果

二、barcode解析

主方法:barcode: function(datas, type, settings)

参数简介:  

  datas【string、object】:

    string:条形码值(依赖条码的类型),If barcode type include it, the presence of the checksum is not mandatory, it ise automatically recalculated

    object:  

      

  type【string】:

    codabar、code11 (code 11)、code39 (code 39)、code93 (code 93)、code128 (code 128)、ean8 (ean 8)、ean13 (ean 13)、td25 (standard 2 of 5 - industrial 2 of 5)、int25 (interleaved 2 of 5)、msi、datamatrix (ASCII + extended)

  settings【object】:

    

示例  

<input type="button" onclick='$("#bcTarget").barcode("1234567890128", "ean13",{barWidth:2, barHeight:30});' value="ean13">
<input type="button" onclick='$("#bcTarget2").barcode("1234567", "int25",{barWidth:2, barHeight:30});' value="int25">
<input type="button" onclick='$("#bcTarget3").barcode({code: "1234567", crc:false}, "int25",{barWidth:2, barHeight:30});' value="int25 without crc">

js-jquery-002-条形码-一维码的更多相关文章

  1. js,JQuery 生成二维码

    代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...

  2. JS/Jquery版本的俄罗斯方块(附源码分析)

    转载于http://blog.csdn.net/unionline/article/details/63250597 且后续更新于此 1.前言 写这个jQuery版本的小游戏的缘由在于我想通过从零到有 ...

  3. 如何使用jquery.qrcode.js插件生成二维码

    1.首先需要准备 jquery.qrcode.js 和 jquery.js github地址:https://github.com/lrsjng/jquery-qrcode 官方文档地址:http:/ ...

  4. 锐浪报表 Grid++Report 一维码无法固定条形码打印宽度

    使用过 锐浪报表的 程序员 都知道,功能很强大,确实带来了很多便利,但今天发现一个问题,关于一维码的条形码无法固定宽度: 打印相差了0.07毫米,居然差别这么大, 打印出来的条码,要么太宽,要么太窄 ...

  5. jquery.qrcode.js 插件生成二维码

    下载地址:https://github.com/jeromeetienne/jquery-qrcode 例子: <!doctype html> <html> <head& ...

  6. C# 一维码生成

    概念 一维条码即指条码条和空的排列规则,常用的一维码的码制包括:EAN码.39码.交叉25码.UPC码.128码.93码,ISBN码,及Codabar(库德巴码)等. 条形码起源于 20 世纪 40 ...

  7. js,jquery,css,html5特效

    包含js,jquery,css,html5特效,源代码 本文地址:http://www.cnblogs.com/roucheng/p/texiao.html 2017新年快乐特效 jQuery最新最全 ...

  8. js/jquery/html前端开发常用到代码片段

    1.IE条件注释 条件注释简介 IE中的条件注释(Conditional comments)对IE的版本和IE非IE有优秀的区分能力,是WEB设计中常用的hack方法.条件注释只能用于IE5以上,IE ...

  9. jQuery整体架构源码解析(转载)

    jQuery整体架构源码解析 最近一直在研读 jQuery 源码,初看源码一头雾水毫无头绪,真正静下心来细看写的真是精妙,让你感叹代码之美. 其结构明晰,高内聚.低耦合,兼具优秀的性能与便利的扩展性, ...

  10. Selenium2学习-014-WebUI自动化实战实例-012-Selenium 操作下拉列表实例-div+{js|jquery}

    之前已经讲过了 Selenium 操作 Select 实现的下拉列表:Selenium2学习-010-WebUI自动化实战实例-008-Selenium 操作下拉列表实例-Select,但是在实际的日 ...

随机推荐

  1. go hmac使用

    https://github.com/danharper/hmac-examples 94 func generateSign(data, key []byte) string { 95 mac := ...

  2. 对map进行排序

    public class TreeMapTest {    public static void main(String[] args) {        Map<String, String& ...

  3. [JS] jquery控件基本要点备份

    (1)CDN Google CDN:<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min. ...

  4. sql 更新字段

    UPDATE YpeopleSET power='0'WHERE power='1'; UPDATE Ypeople SET power='1' WHERE power='0' and pid='22 ...

  5. 【BZOJ】1025: [SCOI2009]游戏(置换群+dp+特殊的技巧+lcm)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1025 首先根据置换群可得 $$排数=lcm\{A_i, A_i表示循环节长度\}, \sum_{i= ...

  6. 通过公网IP主机建立ssh隧道

    环境描述 hostA: 有公网IP的linux主机 hostB: 私有路由器后端无公网IPlinux主机,能够ssh连接到hostA hostC: 个人pc机 隧道创建步骤 step1 在hostB上 ...

  7. EF报LINQ to Entities 不识别方法“Web_JZRepository.Models.copy_materials_details get_Item(Int32) ”,因此该方法无法转换为存储表达式。

    说明用了如 List<T> list=new List<T>(); je.copy_materials_details.SingleOrDefault(x => x.ID ...

  8. JQuery获取和设置select下拉框的值

    获取Select : 获取select 选中的 text : $("#sid").find("option:selected").text(); 获取selec ...

  9. maven+springmvc错误 JAX-RS (REST Web Services) 2.0 can not be installed

    项目problem提示错误 JAX-RS (REST Web Services) 2.0 can not be installed : One or more constraints have not ...

  10. python3----练习题(....)

    # 保存文件(文本,图片,视频...) 1 def save_file(): url = 'http://css.8684.cn/citys/images/line/45.jpg' root = r' ...