Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
/search/変数名なしでフォームを URL に送信する必要があります。そのため、フォーム「foobar」に入力すると、フォームが GET 形式で に送信され/search/foobarます。
/search/
/search/foobar
どうすればこれを達成できますか?私が見る限り、HTML でそれを行う方法はなく、jQuery を使用する必要があります。
<form action = "/search/" onsubmit="this.action += encodeURIComponent(this.term.value); this.term.disabled = 'disabled'"> <input type="text" name="term"> </form>