我认为我的问题是,烧瓶无法找到我的java脚本的关键和价值。那么,我该如何解决呢? 这是我的python:
def ledStudy_handler():
if request.form['study'] == "on":
GPIO.output(11, GPIO.HIGH)
print("lights on")
elif request.form['study'] == "off":
GPIO.output(11, GPIO.LOW)
print("lights off")
return render_template("home.html")
这是我的js:
function ledStudy() {
var checkStudy = document.getElementById("checkStudy");
if (checkStudy.checked == true){
var checkStudy.study = "on";
}
else {
var checkStudy.study = "off";
}
}