jQuery外掛程式jquery-barcode實現條碼列印的方法,jquery條碼外掛程式

來源:互聯網
上載者:User

jQuery外掛程式jquery-barcode實現條碼列印的方法,jquery條碼外掛程式

本文執行個體講述了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程式設計有所協助。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.