index.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <!doctype html>
  2. <html lang="zh">
  3. <head>
  4. <!-- Required meta tags -->
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <!-- Bootstrap CSS -->
  8. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  9. <title>Hello, world!</title>
  10. </head>
  11. <body>
  12. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  13. <form role="form" id="form_register">
  14. <input type="text" class="form-control" id="cellphone" placeholder="手機號碼" name="cellphone">
  15. <button type="submit" class="btn btn-light">
  16. <span class="lead font-weight-bold">
  17. 立即查詢 <i class="ml-1 fas fa-sign-in-alt"></i>
  18. </span>
  19. </button>
  20. </form>
  21. </body>
  22. <script>
  23. $(document).ready(function(){
  24. axios({
  25. method: 'get',
  26. baseURL: 'http://139.162.121.30',
  27. url: '/users',
  28. 'Content-Type': 'application/json',
  29. })
  30. .then((result) => { console.log(result.data) })
  31. .catch((err) => { console.error(err) })
  32. </script>
  33. </html>