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.
如果用户没有输入所需的详细信息并单击提交按钮,有没有办法停止 cakephp ajax 提交以停止提交。
问候
我使用 $ajax->submit ' create ' 选项,调用用户 javascript 函数 foo()。在 foo() 函数中,我有Event.stop('submitButtonId'); 其中submitButtonId是提交按钮 ID。
Event.stop() 阻止事件冒泡,从而阻止 ajax 提交。