请检查表单的代码和逻辑是否正确。另外,请确保在表单提交之前已经将todos_id赋值为正确的值。可以使用console.log()语句检查值是否正确。例如:
function handleSubmit(event) { event.preventDefault(); console.log(todos_id); // 检查todos_id是否为正确的值 // 继续执行其他代码 }
function handleChange(event) { setTodosId(event.target.value); // 更新todos_id的值 }