最简单的方法
flask run.py加入
templates里的页面加
flask run.py加入
@app.route('/custom', methods=['GET', 'POST'])
def custom():
if request.method == 'POST':
time = request.form.get('time')
...
templates里的页面加
<form method="POST" action="{{ url_for('custom') }}">
<input type="text" name="time" class="time-input" placeholder="example: 12/30s/20m/2h">
<input type="submit" class="startButton" value="START">
</form>