Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有字段的表格。我希望在单击提交按钮后,我可以输入文本并将其显示在同一页面上,就在提交按钮之后。第一次,我如何检查按钮没有被点击?你可以帮帮我吗 ?先感谢您。田,
要检查页面是否提交了表单数据,您可以执行以下操作:
if ($this->request->data) { ... }在控制器中,或
if ($this->request->data) { ... }
if ($this->request()->data) { ... }在视图中。
if ($this->request()->data) { ... }