表单提交后未加载 CSS - jQuery Mobile

标签 css jquery-mobile forms multipage

我有一个 HTML 表单,提交后会加载结果页面。

当我使用 anchor 标记链接到相同的结果页面时,我可以使用 rel="external"data-ajax="false" 强制完整刷新页面并重新加载相关页面 CSS。

从提交中加载的页面是否有等效项?我目前没有使用 jQuery 提交表单。

注意:

除了 @peterm 的回答,我最初尝试没有成功,我在表单的操作字符串 (action="results.php?type=search") 中附加了一个参数,我将其移入表单中隐藏的输入元素:

<input type="hidden" name="type" value="search" />

完成此操作后,它对我来说非常有效。

最佳答案

您可以在 form 元素上使用 data-ajax="false"

根据 jQuery Mobile Docs

To submit a form without Ajax, you can either disable Ajax form handling globally, or per form via the data-ajax="false" attribute. The target attribute (as in target="_blank") is respected on forms as well, and will default to the browser's handling of that target when the form submits. Note that unlike anchors, the rel attribute is not allowed on forms.

关于表单提交后未加载 CSS - jQuery Mobile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14366964/

相关文章:

javascript - Android 上的 jQueryMobile 页面转换

html - CSS 响应式网页 : display 2 ul li elements in one line (into each other)

javascript - HTML5 Canvas 层到 HTML/CSS 代码

html - 这是移动单页应用程序中页面管理的可行设计/策略吗?

jquery mobile 加载脚本两次

html - 为什么在使用自定义图形时我在 Chrome/Firefox 中的提交按钮位置不同?

javascript - 当涉及重音等时,如何从 javascript 以 GET 请求形式重现 url 编码?

Angularjs - 如何获得 ng-message required 错误以同时显示和禁用输入按钮

jquery - 名称包含两个单词的输入的 Css 选择器?

html - 在 iPhone iOS/Safari 上使用 HTML 输入类型编号显示缺陷