由于使用 asp.net mvc 和 jquery mobile 进行 ajax 导航而导致表单发布问题

发布于 2024-10-03 03:26:00 字数 209 浏览 0 评论 0原文

我在内页中有一个登录表单,但由于 jQuery Mobile 使用 AJAX 导航,我无法在页面加载 AJAX 时发布该表单。但是,如果我将 rel="external" 放在主页的登录链接中,则可以轻松发布登录表单,但随后我就失去了 jQuery Mobile 提供的炫酷功能。有没有办法在主页不使用 rel="external" 的情况下发布表单?

I have a login form in the inner pages but because jQuery Mobile uses AJAX navigation I am not able to post that form when the page is AJAX loaded. But if I put rel="external" in the login link at home page the login form is posted easily but then i lose the cool features provided by jQuery Mobile. Is there any way to post the form while not using rel="external" at the home page?

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

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

发布评论

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

评论(1

月朦胧 2024-10-10 03:26:00

在登录表单上禁用 AJAX 表单提交。根据文档

要防止使用 Ajax 自动处理表单提交,请将 data-ajax="false" 属性添加到表单元素。您还可以通过 ajaxFormsEnabled 全局配置选项完全关闭 Ajax 表单处理。

Disable AJAX form submission on the login form. Per the documentation:

To prevent form submissions from being automatically handled with Ajax, add the data-ajax="false" attribute to the form element. You can also turn off Ajax form handling completely via the ajaxFormsEnabled global config option.

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