【问题标题】:How to make sure the ' index page' is making the load() call to load the content of other pages?如何确保“索引页面”正在调用 load() 以加载其他页面的内容?
【发布时间】:2012-08-26 21:33:07
【问题描述】:

如果有人能指出我正确的方向,我将不胜感激。我的网站有五个页面:

  • index.html
  • cars.html
  • planes.html
  • toys.html
  • contact.html

'index.html' 调用load() 并仅加载点击的导航链接的内容。假设用户输入 URL:

“http://www.abc.com/cars.html”

用户被带到“cars.html”页面而不是“index.html”。现在,如果“cars.html”页面导航中的用户点击飞机,我想调用“index.html”,然后调用load() 来加载“planes.html”的内容。

我正在检查“index.html”页面,如果它不是加载其他页面内容的页面,那么我想调用“index.html”,然后在其中加载请求的页面内容。

【问题讨论】:

    标签: jquery html


    【解决方案1】:

    在javascript中使用window.location检查当前页面 然后在需要的地方重定向

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多