Home » jQuery 外掛

[jQ]jQuery Barcode plugin 0.3

範例 1
沒錯!只要 1,200 元就能獲得我們團隊完整的協助,讓效果能迅速的整合到您的網站,並保證瀏覽器的相容性。
立刻申請!



一般的條碼都是透過專門的程式或是特定的字型來產生的,但 jQuery Barcode plugin 可以直接把文字轉換成條碼的格式並顯示。這樣一來就算條碼掃瞄器讀不出來也可以透過原始文字來判斷值。

套件名稱:jQuery Barcode plugin
套件版本:0.3
作者網站:http://code.google.com/p/jquery-barcode/
套件網址:http://plugins.jquery.com/project/Barcode
發佈日期:2009-04-28
檔案大小:10.9 KB
檔案下載:jquery.barcode.0.3.js

參數說明:

檢視原始碼 JavaScript
1
2
3
4
5
6
7
8
9
10
11
thinBarWidth(選填)
描述: 最細的寬度(不過目前沒有用)
預設值: 1
 
height(選填)
描述: 產生後的條碼高度
預設值: '100%'
 
code(選填)
描述: 要產生的條碼編碼
預設值: 'code39'

方法說明:

檢視原始碼 JavaScript
1
2
// 把指定區塊的內容轉換成條碼
$(selector).barcode(settings);

使用範例:

檢視原始碼 JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.barcode.0.3.js"></script>
<style type="text/css">
	.barcode39, .barcodeI25 {
		width: 500px;
		height: 50px;
	}
</style>
<script type="text/javascript">
	$(function(){
		$('#code39').click(function(){
			// 轉換成 Code39
			$('.barcode39').barcode({
				code:'code39'
			});
		});
 
		$('#code25').click(function(){
			// 轉換成 Interleaved 2 of 5
			$('.barcodeI25').barcode({
				code:'I25'
			});
		});
	});
</script>
 
<body>
	<input type="button" value="CODE39" id="code39" />
	<br /><br />
	<div class="barcode39">
		A123456789
	</div>
 
	<br /><br />
 
	<input type="button" value="CODE25" id="code25" />
	<br /><br />
	<div class="barcodeI25">
		123456789
	</div>
</body>
範例 1

檔案描述
基本的範例檔案(免空) 開始下載
基本的範例檔案 會員限定

7 筆針對 [jQ]jQuery Barcode plugin 0.3 的迴響

發表迴響