假设我有一个通过 GET 发送的表单:
<form method="get" action="/search.php?foo=bar&test=1&something=else">
<input type="text" name="day" placeholder="day"/>
<input type="text" name="link" placeholder="link"/>
</form>
Run Code Online (Sandbox Code Playgroud)
提交表单并处理数据(仅将其保存到文件中)后,网址更改为:
search.php?day=test&link=google.com
我应该怎么做才能使网址变成:
/search.php?foo=bar&test=1&something=else&day=test&link=google.com
(保留属性中包含的旧参数action。 )