久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <legend id='JNm2Y'><style id='JNm2Y'><dir id='JNm2Y'><q id='JNm2Y'></q></dir></style></legend>

      1. <i id='JNm2Y'><tr id='JNm2Y'><dt id='JNm2Y'><q id='JNm2Y'><span id='JNm2Y'><b id='JNm2Y'><form id='JNm2Y'><ins id='JNm2Y'></ins><ul id='JNm2Y'></ul><sub id='JNm2Y'></sub></form><legend id='JNm2Y'></legend><bdo id='JNm2Y'><pre id='JNm2Y'><center id='JNm2Y'></center></pre></bdo></b><th id='JNm2Y'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JNm2Y'><tfoot id='JNm2Y'></tfoot><dl id='JNm2Y'><fieldset id='JNm2Y'></fieldset></dl></div>

          <bdo id='JNm2Y'></bdo><ul id='JNm2Y'></ul>

        <small id='JNm2Y'></small><noframes id='JNm2Y'>

      2. <tfoot id='JNm2Y'></tfoot>

        如何在 Web 應(yīng)用程序中使用條碼掃描儀

        How to use barcode Scanner in web Application(如何在 Web 應(yīng)用程序中使用條碼掃描儀)
          <legend id='ClmAt'><style id='ClmAt'><dir id='ClmAt'><q id='ClmAt'></q></dir></style></legend>

          <small id='ClmAt'></small><noframes id='ClmAt'>

          <i id='ClmAt'><tr id='ClmAt'><dt id='ClmAt'><q id='ClmAt'><span id='ClmAt'><b id='ClmAt'><form id='ClmAt'><ins id='ClmAt'></ins><ul id='ClmAt'></ul><sub id='ClmAt'></sub></form><legend id='ClmAt'></legend><bdo id='ClmAt'><pre id='ClmAt'><center id='ClmAt'></center></pre></bdo></b><th id='ClmAt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ClmAt'><tfoot id='ClmAt'></tfoot><dl id='ClmAt'><fieldset id='ClmAt'></fieldset></dl></div>

              <tbody id='ClmAt'></tbody>

                  <bdo id='ClmAt'></bdo><ul id='ClmAt'></ul>

                • <tfoot id='ClmAt'></tfoot>

                  本文介紹了如何在 Web 應(yīng)用程序中使用條碼掃描儀的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我想在我的 Laravel 應(yīng)用程序中使用條形碼掃描儀.這是一個在線銷售點應(yīng)用程序.我知道條碼掃描器只返回一個字符串,然后按 Enter 按鈕.但是為了捕獲這個字符串,我需要使用一個表單并選擇輸入字段.如果我不選擇輸入字段,它就無法捕獲數(shù)據(jù).我想要的是在不選擇表格的情況下使用條形碼掃描儀.有可能嗎?

                  I would like to use barcode scanner in my Laravel application. This is an online Point of Sale Application. I know that barcode scanner returns just a string and press Enter Button. But to capture this string I need to use a form and select the input field as well. If I dont select the input field it cann't capture the data. What I want is to work the barcode scanner without selecting the form. Is it possible anyway ?

                  推薦答案

                  您可以使用 JavaScript 捕獲條形碼閱讀器發(fā)送的按鍵.

                  You can capture the keypresses that the barcode reader sends with JavaScript.

                  向窗口或文檔對象添加事件偵聽器以捕獲文檔中任何位置的任何按鍵.檢查傳入字符中是否有表示條形碼結(jié)束的字符(可能是新行).

                  Add an event listener to the window or document object to capture any keypresses anywhere in the document. Check the incoming characters for one which signals the end of the barcode (probably a new line).

                  這是我使用 RFID 閱讀器為類似任務(wù)編寫的一些代碼.它取決于 jQuery(主要是因為 jQuery 對 event.which 進(jìn)行的規(guī)范化使得識別按下的字符變得方便)但是如果您愿意,您可以重寫它以避免這種情況.

                  This is some code I wrote for a similar task using an RFID reader. It depends on jQuery (mostly because the normalisation jQuery does on event.which makes identifying the character pressed convenient) but you can rewrite it to avoid that if you like.

                  它將每個按鍵存儲在一個數(shù)組中,除非按鍵是 Enter(我使用的 RFID 閱讀器在每次掃描后發(fā)送).如果它得到一個回車,它接受掃描的代碼并對其進(jìn)行操作(我正在使用 Socket.IO 將它發(fā)送到服務(wù)器,你可以用它做任何你喜歡的事情)然后清除數(shù)組,以便下一次掃描可以從新鮮開始.

                  It stores each keypress in an array unless the press is of Enter (which the RFID reader I was using sent after each scan). If it gets an Enter, it takes the scanned code and acts on it (I'm using Socket.IO to send it to the server, you can do whatever you like with it) and then clears the array so that the next scan can start from fresh.

                  var keybuffer = [];
                  
                  function press(event) {
                    if (event.which === 13) {
                      return send();
                    }
                    var number = event.which - 48;
                    if (number < 0 || number > 9) {
                      return;
                    }
                    keybuffer.push(number);
                  }
                  
                  $(document).on("keypress", press);
                  
                  function send() {
                    socket.emit('scan', keybuffer.join(""));
                    keybuffer.length = 0;
                  }
                  

                  這篇關(guān)于如何在 Web 應(yīng)用程序中使用條碼掃描儀的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)
                    <tbody id='jhCTW'></tbody>
                    <bdo id='jhCTW'></bdo><ul id='jhCTW'></ul>

                      <legend id='jhCTW'><style id='jhCTW'><dir id='jhCTW'><q id='jhCTW'></q></dir></style></legend>
                          <tfoot id='jhCTW'></tfoot>

                          <i id='jhCTW'><tr id='jhCTW'><dt id='jhCTW'><q id='jhCTW'><span id='jhCTW'><b id='jhCTW'><form id='jhCTW'><ins id='jhCTW'></ins><ul id='jhCTW'></ul><sub id='jhCTW'></sub></form><legend id='jhCTW'></legend><bdo id='jhCTW'><pre id='jhCTW'><center id='jhCTW'></center></pre></bdo></b><th id='jhCTW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jhCTW'><tfoot id='jhCTW'></tfoot><dl id='jhCTW'><fieldset id='jhCTW'></fieldset></dl></div>
                          1. <small id='jhCTW'></small><noframes id='jhCTW'>

                          2. 主站蜘蛛池模板: 九色视频网站 | 全免费a级毛片免费看视频免费下 | www.日本国产 | 欧美日韩免费一区二区三区 | 久久精品69| 日韩一级 | 欧美国产视频 | 国产高清久久 | 欧美成人h版在线观看 | 日韩一级| wwwxxx国产 | 青青草在线视频免费观看 | 中文字幕日韩一区 | 成人av在线网站 | 久久精品国内 | 免费成人在线网站 | 久久伊人操 | 在线观看成人免费视频 | 91视频www.| 久久99精品久久久久久国产越南 | 日韩精品一区在线 | 日日操夜夜干 | 精品网| 夜夜骑首页 | 亚洲欧洲综合av | 欧美日韩在线国产 | 亚洲二区在线 | 男女视频91| 亚洲精品一区二区三区蜜桃久 | 日韩国产在线 | 国产日韩欧美精品一区二区 | 国产japanhdxxxx麻豆 | 中文字幕一区二区三区精彩视频 | 天天干天天爱天天操 | 欧美亚洲另类丝袜综合网动图 | 91麻豆产精品久久久久久夏晴子 | 永久www成人看片 | 久久精品国产一区二区电影 | 中文字幕一区二区三区在线观看 | 欧美视频二区 | 亚洲日本乱码在线观看 |