Jquery ui tab-wise 验证

发布于 2024-09-10 21:27:57 字数 145 浏览 1 评论 0原文

我正在使用 UI 选项卡,并且我想验证每个选项卡。

当我单击第二个选项卡时,我必须验证第一个选项卡。如果选项卡有效,则转到第二个选项卡,如果选项卡无效,则留在当前选项卡并填写缺少的表单元素。对于我的所有选项卡,依此类推。

谁能帮我解决这个问题。

I am using UI tabs and i want to validate each tab.

When I click the second tab i must validate the first tab.If tab is valid go to second tab, if tab is not valid stay to the current tab and fill in missing form elements.And so on for all my tabs.

Can anyone help me with this.

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

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

发布评论

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

评论(1

岁吢 2024-09-17 21:27:57

在选项卡的 select 事件上验证表单。如果在该事件中返回 false,则选项卡将不会更改..

如下所示:

$('#example').tabs({
    select: function(event, ui) {
        return validate;// call your validation method here and return the result 
    }
});

validate the form on the select event for the tab. if you return false in that event then the tab will not be changed..

as follows :

$('#example').tabs({
    select: function(event, ui) {
        return validate;// call your validation method here and return the result 
    }
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文