javascript - 在 VSlint 中没有显示错误?
问题描述
我正在使用 VS Lint,但代码无法按我的需要运行。
谁能提供一些关于我的脚本标签应该是什么样子的建议?
就上下文而言,这个脚本出现在我的表单之后。
async function onFormSubmit(ev) {
ev.preventDefault();
const EL_form = ev.currentTarget;
return (await fetch(EL_form.action)).json();
}
const ELS_form = document.getElementByID('element');
ELS_form.forEach((el) =>
el.addEventListener("submit", (ev) => {
onFormSubmit(
const response = await fetch("/lookup/" + 'user input')
.then(result =>result.json())
.then(res => console.log(res));
})
);
解决方案
推荐阅读
- java - 用实际的 Controller 替换 Mocked Spring Boot Controller
- android - 多风格库:“必需的 org.gradle.usage 'java-api' 并发现不兼容的值 'java-runtime'”
- nuxeo - 如何在 nuxeo 平台中限制上传的文件类型
- c# - Modbus TCP 主到多个从连接
- javascript - How to make koa ctx.throw() use application/json rather than text/plain
- android - Kotlin 协程 - 异步等待
- c - 使用基地址访问结构成员
- mysql - 计算精度 MySQL
- paypal-sandbox - 抱歉,您的银行目前无法验证您的 VISA ****。请选择其他支付方式
- php - Sphinx - 增加最大结果