我有此代码:
<form novalidate method="get"
action=" http://domain.test/result?s_city=&s_name=&s_phone=&s_price=3&s_price_from=&s_price_to=182&s_province=&s_weight_from=&s_weight_to=&s_year_birth_from=&s_year_birth_to=&work_now=1 "
class="form-horizontal removeAction" id="searchAction">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-4 ">
<select class="selectpicker indexSelect1 filterMenu3 callendarFilter callendarFilterCategory"
name="sortAfter" onchange="this.form.submit()">
<option value="">Sortuj według</option>
<option value="1">
Sort A-Z
</option>
<option value="2">
Sort Z-A
</option>
<option value="3">
Sort from newest
</option>
<option value="4">
Sort from oldest
</option>
</select>
</div>
</form>
当我从select / option中选择一个选项时-然后是重新加载页面后我所拥有的而不是保存在form-> action中的参数:
http://domain.test/result?sortAfter=3
代替:
http://domain.test/result?s_year_birth_from=&s_year_birth_to=&s_province=&s_city=&s_weight_from=&s_weight_to=&s_price=3&s_price_from=&s_price_to=182&work_now=1&s_phone=&s_name=
(URL链接中的参数丢失)。
有人知道如何解决吗?