国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jQuery插件jquery-barcode實現條碼打印的方法

2019-11-20 11:10:08
字體:
來源:轉載
供稿:網友

本文實例講述了jQuery插件jquery-barcode實現條碼打印的方法。分享給大家供大家參考,具體如下:

這是一個純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程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 竹北市| 廊坊市| 云浮市| 花莲市| 东乌珠穆沁旗| 绥中县| 阜宁县| 拜泉县| 太仆寺旗| 昌都县| 墨脱县| 贺兰县| 阿拉善左旗| 无棣县| 蓬莱市| 长武县| 调兵山市| 仁布县| 鲁山县| 全州县| 乌兰察布市| 崇礼县| 商水县| 勐海县| 和田县| 肥乡县| 信丰县| 资源县| 枞阳县| 金乡县| 白城市| 洛南县| 沭阳县| 库伦旗| 安多县| 高雄县| 怀安县| 阿拉尔市| 达州市| 永登县| 吐鲁番市|