真正使用 GET 的原生搜索表单 | 星雨笔录
使用 GET 查询参数构建可用的搜索表单。
核心: GET 表单把字段放到 URL 查询串;搜索通常用 method="get"。
最小示例:
<form action="/search" method="get">
<input name="q" placeholder="输入关键字">
<button>搜索</button>
</form>
学完能做: 使用 GET 查询参数构建可用的搜索表单。
使用 GET 查询参数构建可用的搜索表单。
核心: GET 表单把字段放到 URL 查询串;搜索通常用 method="get"。
最小示例:
<form action="/search" method="get">
<input name="q" placeholder="输入关键字">
<button>搜索</button>
</form>
学完能做: 使用 GET 查询参数构建可用的搜索表单。