在2个提交按钮中的formvalidation

发布于 2025-01-19 04:35:31 字数 88 浏览 0 评论 0原文

我有2个提交按钮的“更新”和“退出”,如何确定是否单击“退出”以及是否单击,然后禁用formvalidation?

请帮助

谢谢 fd

I have 2 submit buttons 'update and 'exit', how to determine if the 'exit' was clicked and if it's clicked then disable the FormValidation?

please help

thanks
FD

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

む无字情书 2025-01-26 04:35:31

您可以为每个提交底部使用不同的ajax调用,并在其自己的功能上做任何您想做的事情。

You can use different ajax call for each submit bottom, and do whatever you want on their own function.

层林尽染 2025-01-26 04:35:31

对于JavaScript,您可以使用以下方式:

<button type="submit" onclick="functionToDoOnTheClick">Submit</button>

这是您的HTML在提交按钮上的外观,然后在JavaScript中您可以拥有可以禁用表单验证的功能。您要添加到onLick的报价中的该功能的名称“”。

For Javascript you can use this:

<button type="submit" onclick="functionToDoOnTheClick">Submit</button>

This is what your HTML should look like on your submit button then in your javascript you can have the function which will disable your form validation. The name of that function you want to add into the quotes for onlick"".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文