Learn a little programming every day PDF ebook free download: Http://www.shitanlife.com/code
Introduce the JS plugin to generate barcodes on GitHub →Jsbarcode
Barcode support is:
CODE128
CODE128 (automatic mode switching)
CODE128 a/b/c (forced mode)
Ean
EAN-13
EAN-8
EAN-5
EAN-2
UPC (A)
CODE39
ITF-14
Msi
MSI10
MSI11
MSI1010
MSI1110
Pharmacode
Codabar
Code
<! DOCTYPE html>
</body>
Jsbarcode We can also set some properties of the bar code (you can set the property details Link: https://github.com/lindell/JsBarcode/wiki/Options)
<script> jsbarcode ("#imgcode", "123", { format: "CODE39",//Select the type of barcode to use width:3,//The width height:100,//height between the bars displayvalue:true,//whether the text is displayed below the barcode text : "456",//overlay the displayed Fontoptions: "Bold Italic",//Make text bold or italic font: "Fantasy",//Set text font textAlign: "Left"//Set horizontal alignment of text TextPosition: Top,//Set the vertical position of the text textmargin:5,//set the spacing between the barcode and the text fontsize:15,//set the size of the text background: "# Eee ",//Set the background of the barcode linecolor:" #2196f3 ",//Set bar and color of text. margin:15//Setting the blank margin around the barcode}); </script>
Github:https://github.com/lindell/jsbarcode
Barcode Generator: http://lindell.me/JsBarcode/generator/
Jsbarcode examples and settings: http://codepen.io/lindell/pen/mPvLXx?editors=1010
Simple Jsbarcode Demo: http://codepen.io/lindell/pen/eZKBdO?editors=1010
Generate barcode Plug-in barcode--jsbarcode