按钮提交表单 HTML 双重操作(提交并重新加载)



我有以下html,按钮执行正常的保存:

<form action="" method="post">    
<input type="hidden" value="{{ people }}" name="people">
<input type="hidden" value="{{ number }}" name="number">
<p>{% trans 'Are you sure you want to save people' %} {{ people }} {% trans 'where number is' %} {{ number }}?
</p>
{% buttons %}
<button class="btn btn-default hover-linea" id="cancel" type="button">
{% bootstrap_icon "remove" %} {% trans 'Cancel' %}
</button>
<button type="submit" class="btn btn-default hover-linea">
{% bootstrap_icon "log-out" %} {% trans 'Save' %}
</button>
{% endbuttons %}

当我进行保存时,我需要的是将上一页重新加载到表单中。我想按保存并执行与现在相同的操作,但也要创建一个相对链接为 (../人.html(。

我等待答复,非常感谢。

您的服务器端表单处理程序(已在action中指定了 URL (属性应使用 HTTP 重定向(状态302Location:标头(响应您希望浏览器加载的 URL。

最新更新