【问题标题】:jquery mobile refresh button not loading cssjquery mobile刷新按钮未加载css
【发布时间】:2013-06-12 18:27:09
【问题描述】:

我的 index.html 文件中插入了带有 css 文件的标题。 然后我加载第二页

<a href="page2.html">page2</a>

它工作正常,但是当我单击刷新按钮或直接访问子页面时 然后没有加载css所以我必须插入css和所有 我在每个页面上需要的 js 文件?

【问题讨论】:

  • 你也可以添加其他的html吗?没有其余代码,这很难实现。
  • 在 jquery mobile 中,如果可能的话,我建议您将所有页面(data-role = page)放在一个页面中,否则您需要按照您所说的在 ech 页面中加载所有 css java-scripts

标签: jquery button mobile refresh


【解决方案1】:

您可以将标题放在一个文件中,然后将其包含在“html”页面中(使用脚本语言,例如 php)。

header.html:

<head>
link to your css and js files
</head>

index.php:

...
include_once('header.html');
...

page2.php:

...
include_once('header.html');
...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-16
    • 1970-01-01
    • 2014-06-24
    • 2012-05-20
    • 2013-03-11
    • 1970-01-01
    • 2013-10-13
    • 1970-01-01
    相关资源
    最近更新 更多