hx-trigger hands-on


<form action="" class="acms-form" method="post">
  <input type="hidden" name="bid" value="1">
  <input type="hidden" name="cid" value="">	
  <input type="hidden" name="query" value="keyword">
  <input type="text" name="keyword" value="" placeholder="検索キーワード" class="acms-form-width-small">
  <input type="submit" name="ACMS_POST_2GET" value="検索" class="acms-btn">
</form>
<div id="result-post" class="demo">このコンテンツが変わります</div>

hx-post と同じフォームです。ここで(検索)を押さないで、キーを入力した時点 hx-trigger="keyup" で htmx を動作させることにチャレンジしてみましょう。

ヒント: hx-getの練習・hx-postの練習 を参考にしてください。

このコンテンツが変わります

関連記事

この記事のハッシュタグ から関連する記事を表示しています。

a-blog cms & htmx blog

htmx sample

a-blog cms template

hx-post hands-on

hx-get hands-on

a-blog cms htmx setup

hx-trigger

htmx modal sample