jquery-barcode:js实现的条码打印
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了jquery-barcode:js实现的条码打印,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2797字,纯文字阅读大概需要4分钟。
内容图文
这是一个纯js的jQuery插件,项目地址:http://barcode-coder.com/en/barcode-jquery-plugin-201.html
使用示例:
1 <! doctype html > 2 < html > 3 < head > 4 < title >jQuery Barcode</title> 5<script type="text/javascript" src="jquery-1.4.4.min.js"></script> 6<script type="text/javascript" src="jquery-barcode.js"></script> 7<style type="text/css"> 8 .barcodeImg{margin:10px 0px} 9</style>10</head>11<body>12<div style="margin:10px">13<input id="src" value="11225921991"></input><br/>14<input type="button" onclick=‘code11()‘ value="code11">15<input type="button" onclick=‘code39()‘ value="code39">16<input type="button" onclick=‘code93()‘ value="code93">17<input type="button" onclick=‘code128()‘ value="code128">18<input type="button" onclick=‘ean8()‘ value="ean8">19<input type="button" onclick=‘ean13()‘ value="ean13">20<input type="button" onclick=‘ean13()‘ value="std25">21<input type="button" onclick=‘int25()‘ value="int25">22<input type="button" onclick=‘msi()‘ value="msi">23<input type="button" onclick=‘datamatrix()‘ value="datamatrix">24<div id="bcTarget" class="barcodeImg"></div>25</div>2627<script type="text/javascript">282930function code11(){ 31 $("#bcTarget").empty().barcode($("#src").val(), "code11",{barWidth:2, barHeight:30,showHRI:false}); 32 } 3334function code39(){ 35 $("#bcTarget").empty().barcode($("#src").val(), "code39",{barWidth:2, barHeight:30,showHRI:false}); 36 } 3738function code93(){ 39 $("#bcTarget").empty().barcode($("#src").val(), "code93",{barWidth:2, barHeight:30,showHRI:false}); 40 } 4142function code128(){ 43 $("#bcTarget").empty().barcode($("#src").val(), "code128",{barWidth:1, barHeight:30,showHRI:false}); 44 } 4546function ean8(){ 47 $("#bcTarget").empty().barcode($("#src").val(), "ean8",{barWidth:2, barHeight:30,showHRI:false}); 48 } 4950function ean13(){ 51 $("#bcTarget").empty().barcode($("#src").val(), "ean13",{barWidth:2, barHeight:30,showHRI:false}); 52 } 5354function std25(){ 55 $("#bcTarget").empty().barcode($("#src").val(), "std25",{barWidth:2, barHeight:30,showHRI:false}); 56 } 5758function int25(){ 59 $("#bcTarget").empty().barcode($("#src").val(), "int25",{barWidth:2, barHeight:30,showHRI:false}); 60 } 6162function msi(){ 63 $("#bcTarget").empty().barcode($("#src").val(), "msi",{barWidth:2, barHeight:30,showHRI:false}); 64 } 6566function datamatrix(){ 67 $("#bcTarget").empty().barcode($("#src").val(), "datamatrix",{barWidth:2, barHeight:30,showHRI:false}); 68 } 69</script>7071</body>72</html>
示例源码地址:jquery-barcode.zip
原文:http://www.cnblogs.com/yjmyzz/p/jquery-barcode.html
内容总结
以上是互联网集市为您收集整理的jquery-barcode:js实现的条码打印全部内容,希望文章能够帮你解决jquery-barcode:js实现的条码打印所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。