2022/07/03 · Ajaxがデータを送り、Pythonが受け取って処理し、その結果をAjaxに送り返してhtmlの一部の要素のみ更新するサンプルを。令和のHello world(by ...
これらの続き Flaskでpythonのウェブアプリケーションを作る Flask-Bootstrapを使ってみる Flask-BootstrapでjQuery 前回Flask-BootstrapでjQueryを使用する方法を紹介したが、ブラウザ側でボタンのラベルを書き換えるだけだった。 今回はAJAXを使用して、ブラウザとサーバ(Flask)で通信させる。 ディレクトリ構成 毎度おなじみのディレクトリ構成 . ├── ajax.py └── templates └── ajax.html ajax.html(htmlファイル) ブロックごとに解説するため、2つに分ける。 contentブロック 先頭からcontentブロックまでを示す。 {% extends "bootstrap/base.html" %} {% block title %}Hello{% endblock title %
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く