这是一个纯js的jQuery插件,项目地址:http://barcode-coder.com/en/barcode-jquery-plugin-201.html

使用示例:

 <!doctype html>
<html>
<head>
<title>jQuery Barcode</title>
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="jquery-barcode.js"></script>
<style type="text/css">
.barcodeImg{margin:10px 0px}
</style>
</head>
<body>
<div style="margin:10px">
<input id="src" value="11225921991"></input><br/>
<input type="button" onclick='code11()' value="code11">
<input type="button" onclick='code39()' value="code39">
<input type="button" onclick='code93()' value="code93">
<input type="button" onclick='code128()' value="code128">
<input type="button" onclick='ean8()' value="ean8">
<input type="button" onclick='ean13()' value="ean13">
<input type="button" onclick='ean13()' value="std25">
<input type="button" onclick='int25()' value="int25">
<input type="button" onclick='msi()' value="msi">
<input type="button" onclick='datamatrix()' value="datamatrix">
<div id="bcTarget" class="barcodeImg"></div>
</div> <script type="text/javascript"> function code11(){
$("#bcTarget").empty().barcode($("#src").val(), "code11",{barWidth:2, barHeight:30,showHRI:false});
} function code39(){
$("#bcTarget").empty().barcode($("#src").val(), "code39",{barWidth:2, barHeight:30,showHRI:false});
} function code93(){
$("#bcTarget").empty().barcode($("#src").val(), "code93",{barWidth:2, barHeight:30,showHRI:false});
} function code128(){
$("#bcTarget").empty().barcode($("#src").val(), "code128",{barWidth:1, barHeight:30,showHRI:false});
} function ean8(){
$("#bcTarget").empty().barcode($("#src").val(), "ean8",{barWidth:2, barHeight:30,showHRI:false});
} function ean13(){
$("#bcTarget").empty().barcode($("#src").val(), "ean13",{barWidth:2, barHeight:30,showHRI:false});
} function std25(){
$("#bcTarget").empty().barcode($("#src").val(), "std25",{barWidth:2, barHeight:30,showHRI:false});
} function int25(){
$("#bcTarget").empty().barcode($("#src").val(), "int25",{barWidth:2, barHeight:30,showHRI:false});
} function msi(){
$("#bcTarget").empty().barcode($("#src").val(), "msi",{barWidth:2, barHeight:30,showHRI:false});
} function datamatrix(){
$("#bcTarget").empty().barcode($("#src").val(), "datamatrix",{barWidth:2, barHeight:30,showHRI:false});
}
</script> </body>
</html>

示例源码地址:jquery-barcode.zip

最新文章

  1. MFC与C#连接MYSQL乱码问题
  2. Vue 过滤器与计算属性
  3. 35-less 简明笔记
  4. xmind的第九天笔记
  5. 定义declare、%TYPE%、ROWTYPE、加循环
  6. HTML5中的Blob对象的使用
  7. 點擊按鈕后彈出新頁面導致原頁面CSS失效
  8. 20145211 《Java程序设计》实验报告五————Java网络编程及安全实验报告
  9. NOIP1998 拼数
  10. asp.net各种获取客户端ip方法
  11. robotium源码方法备注---clicker.java
  12. Expanding Rods
  13. Android:WebView(慕课网)
  14. shell之算数运算符、逻辑运算符、关系运算符、布尔运算符、文件测试运算符
  15. 第十五章:Python の Web开发基础 (二) JavaScript与DOM
  16. vue.js实战——splice使用
  17. List GroupBy真实用法,Reflection(反射)用法,Enum用法,正则,搜索下拉布局
  18. 关于地形altas的处理
  19. nodejs设置跨域访问
  20. HanLP用户自定义词典源码分析

热门文章

  1. 解决Windows 8系统假死的方法
  2. asp.net mvc 之旅—— 第二站 窥探Controller下的各种Result
  3. spring 事务管理方式及配置
  4. js中的三个编码函数:escape,encodeURI,encodeURIComponent
  5. Linux下NDK编译FFMPEG包含neon参数
  6. mysql字符编码集(乱码)问题解决
  7. JavaScript动态显示当前时间
  8. iOS上传App Store报错:this action cannot be completed -22421 解决方案
  9. my_ls
  10. android:context,getApplicationContext()生命周期