简体   繁体   中英

How to create button for mobile to scan Barcode using html5 jquery or javasctipt?

Is there any way to trigger mobile phone camera to scan Barcode from html using jquery or javascript ? I would like to create form and then button (when you clicked on mobile it will let you scan code and it will place the code on input field) Is that possible?

You might want to look at: https://serratus.github.io/quaggaJS/

I haven't used it in any production code yet but have experimented with it. Scanning good quality barcodes works well. Scanning through plastic bags and shrink wrap is a bit iffy. (To be fair, dedicated scanners also have issues there, but tend to do better.)

Tested only on Android with Chrome and Firefox. Requires the most recent iOS/Safari to work on that platform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM