且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

表单已提交但值未通过

更新时间:2023-12-01 20:10:22

您的表单包含两个表单控件.两者都不是成功的控件(即出现在提交的数据中的控件),但出于不同的原因.

Your form contains two form controls. Neither will be a successful control (i.e. one that appears in the submitted data), but for different reasons.

只有具有name 属性的表单控件才能成功.您的文本输入没有 name.(它也没有默认值,所以你需要先输入它)

Only form controls with name attributes can be successful. Your text input doesn't have a name. (It also doesn't have a default value, so you need to type in it first).

按钮只有当它们是用于提交表单的提交按钮时才能成功.您的按钮不是提交按钮,您使用 JavaScript 提交表单.

Buttons can only be successful if they are the submit button used to submit the form. Your button isn't a submit button and you use JavaScript to submit the form.