javascript - 烧瓶上的“错误请求”错误
问题描述
我认为我的问题是烧瓶找不到我的 java 脚本的键和值。那么,我该如何解决呢?这是我的蟒蛇:
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";
}
}
解决方案
推荐阅读
- python-3.x - 如何在 python3 中停止来自其他线程的 input()?
- vaadin - 在 Vaadin 中为 Sizeable 对象设置 widthUnit/heightUnit
- excel - EXCEL:使用行的条件格式不起作用
- tensorflow - 张量流示例中的训练/测试数据
- microsoft-cognitive - Microsoft Academic Graph API 当前是否接受新订阅者?
- ibm-cloud - 在 IBM WATSON Cloud 上保护 Node Red GUI
- java - Leetcode:从排序数组中删除重复项
- javascript - 将变量推送到 GoogleApps 脚本中的下拉列表
- android - 视频聊天 IOS/Android Webrtc。GoogleWebRTC 考试
- java - java 8日期时间的单一模式