我想将用html编写的按钮的值更改为"记录".我想要寻址并更改Python中的按钮.这是为了防止在请求表单更改时轻触记录按钮两次,并获得工作的视觉反馈.
this is what i have:个
@app.route('/camera', methods=['GET', 'POST'])
def camera():
if request.method == 'POST':
if request.form['record'] == 'record here' : # <-------- here I ask what the value of the button
print ("is recording") # is and it works fine
p1 = threading.Thread(target=recording)
p1.start()
return render_template('camera.html')
this is what i want:个
@app.route('/camera', methods=['GET', 'POST'])
def camera():
if request.method == 'POST':
if request.form['record'] == 'record here' :
print ("is recording")
p1 = threading.Thread(target=recording)
p1.start()
request.form['record'] = 'records' : # <----------------- Something like this
return render_template('camera.html')
我是一个python html flask和web开发的新手.