乾太 ₍₍ ◝(・◡・)◟ ⁾⁾ says to YSITD
<!DOCTYPE html> <html> <head> <base target="_top"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title>財產管理系統 - 登入頁面</title> <style> body { padding-top: 40px; padding-bottom: 40px; background-color: #eee; } form, table { /*max-width: 330px;*/ padding: 15px; margin: 0 auto; } /*.form-signin .form-signin-heading .form-signin .checkbox { margin-bottom: 10px; } .form-signin .checkbox { font-weight: normal; } .form-signin .form-control { position: relative; height: auto; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 10px; font-size: 16px; } .form-signin .form-control:focus { z-index: 2; } .form-signin input[type="text"] { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .form-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; }*/ </style> <!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">--> <link rel="stylesheet" href="https://unpkg.com/@coreui/coreui@3.0.0-beta.1/dist/css/coreui.min.css"> </head> <body> <div style="display: flex; justify-content: center;"> <form class="login-form"> <h2>查詢頁面</h2> <div class="form-group"> <label for="id" class="sr-only">ID</label> <input type="text" id="id" name="id" class="form-control" placeholder="ID" required autofocus> </div> <button class="btn btn-lg btn-primary btn-block" id="qry_btn" type="submit">查詢</button> </form> <div class="table table-responsive"> <table class="table table-striped"> <tbody> <tr> <td>ID</td> <td id="f1"></td> </tr> <tr> <td>品項</td> <td id="f2"></td> </tr> <tr> <td>Related ID</td> <td id="f3"></td> </tr> <tr> <td>製造商</td> <td id="f4"></td> </tr> <tr> <td>財產價值</td> <td id="f5"></td> </tr> <tr> <td>台幣等值</td> <td id="f6"></td> </tr> <tr> <td>購入日期</td> <td id="f7"></td> </tr> <tr> <td>用途</td> <td id="f8"></td> </tr> <tr> <td>放置位置</td> <td id="f9"></td> </tr> <tr> <td>作廢日期</td> <td id="f10"></td> </tr> <tr> <td>備註</td> <td id="f11"></td> </tr> <tr> <td>貼紙</td> <td><input id="f12" type="checkbox"></td> </tr> </tbody> </table> </div> <div style="display:none;" id="camera"></div> </div> <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"> </script> <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>--> <!--<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>--> <script src="https://serratus.github.io/quaggaJS/examples/js/quagga.min.js"></script> <script> function query_callback(data) { data = JSON.parse(data); $('#f1').text(data[0]);