
- 帖子
- 6
- 主題
- 4
- 精華
- 0
- 積分
- 7
- 威望
- 4
- 金錢
- 1
|
N個input欄位,要驗證是否重複輸入同樣的東西
今天我有N個input欄位 它們的id分別是
<input type="text" id="sal_barcode" />
<input type="text" id="sal_barcode1" />
<input type="text" id="sal_barcode2" />
.
.
.
<input type="text" id="sal_barcodeN" />
而我有另一個欄位是
<input type="text" id="prod_barcode" />
假設都會先在prod_barcode這邊輸入東西
而我想要在這N個sal_barcode input欄位,用onblur的方式 驗證說 假設任一欄位
輸入的東西跟prod_barcode裡的是一樣的話就跳出alert
請問這樣要怎麼寫??? |
|