<select name="cid" id="cid" class="form-control">
<option value="">全部</option>
{{range .category}}
<option value="{{.id}}">{{.title}}</option>
{{end}}
</select>
js
$("#cid").change(function () {
location.href = location.pathname + '?' +
new URLSearchParams(new FormData($("#searchForm")[0])).toString()
})
没有评论:
发表评论