0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

JQueryの簡易ローディング

Posted at

色々小細工しなくたって、これでいいよね。


  <header class="">
    ナニガシカノナビゲーション
  </header>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script>
    $(document).ready(function () {
      $('#form').on('submit', function(e) {
        $('#loading-screen').show();
        $('main').hide();
      });
    });
  </script>
  <div class="text-center py-3" id="loading-screen" style="display: none;">
    <button class="btn btn-primary btn-lg" type="button" disabled>
      <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
      登録中
    </button>
  </div>

  <main>
    イロイロカキタイコト
   <form action="{{ route('upload') }}" method="POST" enctype="multipart/form-data" id="form">
   @csrf
     <div class="mb-5">
      <div>
        <label for="file" class="form-label">データをアップロード</label>
        <input class="form-control" id="file" type="file" name="file">
      </div>
    </div>
    <div class="text-center">
      <button type="submit" class="btn btn-primary btn-lg" id="submit">アップロード</button>
    </div>
   </form>
  </main>
  

未来のボクへの贈り物をシェアします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?