一组表单里有两个提交按钮 <input type="submit">
:
<form action="{{ url_for('index') }}" method="post"> <input type="submit" name="up" value="up"> <input type="submit" name="down" value="down"></form>
python 代码:
if request.method == 'POST': if request.form['up']: return redirect(url_for('index')) elif request.form['down']: return redirect(url_for('index'))
其中 up
这个可以正常提交,但是 down
这个就报错:
Bad Request The browser(or proxy) sent a request that this server could not understand.
怎么解决?
炎炎设计
12345678_0001
相关分类