
<!DOCTYPE html>
<html lang="ja">

<head>
  <meta charset="utf-8">
  <title>ログイン画面​</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="./js/jquery-3.6.1.min.js"></script>
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.4/css/all.css">
  <link rel="stylesheet" href="./css/style.css?1675125104">
  <script src="./js/clog.js?1675125104" crossorigin="anonymous"></script>
</head>

<body>
  <header class="header">
    <div class="header__logo">
      <a class="header__logo__inner" href="#">
        <img src="./images/logo.png" alt="#">
      </a>
    </div>
  </header>
  <div class="content__login">
    <!--ログイン画面-->
    <h2 class="content__login__h2">ログイン</h2>
    <!-- <form class="login__form" METHOD="POST" ACTION="index_check.php"> -->
    <form class="login__form" METHOD="POST">
      <div class="login">
        <div class="login__body">
          <div class="login__inner">
            <label class="login__label"></label>
            <input type="text" class="login__id" name="id" placeholder="会員番号">
          </div>
          <div class="login__inner">
            <label class="login__label"></label>
            <input type="password" class="login__password" name="password" placeholder="パスワード">
          </div>
        </div>
        <input type="hidden" name="token" value="d4028043cb4a388275b55c94a9772576544853e9d7a5c54ced3104922e7f4950">
        <input type="submit" id="login__btn" value="ログイン">
    </form>
      </div>
  <div class="login__footer">
    <h1 class="login__h1"></h1>
    <p class="login__p"></p>
  </div>
  </div>
  <script>
    $('form').on('keydown', 'input, button, select', function(e) {
      console.log('e.keyCode:' + e.keyCode);
      if (e.keyCode == 13) {
        console.log('$(this).attr("type"):' + $(this).attr("type"));
        if ($(this).attr("type") == 'submit' || $(this).attr("type") == 'button') {
          return;
        }
        var form = $(this).closest('form');
        var focusable = form.find('input, button[type="button"], button[type="submit"], select, textarea')
          .not('[readonly]').filter(':visible');
        if (e.shiftKey) {
          focusable.eq(focusable.index(this) - 1).focus();
        } else {
          var next = focusable.eq(focusable.index(this) + 1);
          if (next.length) {
            next.focus();
          } else {
            focusable.eq(0).focus();
          }
        }
        e.preventDefault();
      }
    });
  </script>
</body>

</html>