1

我正在使用 History.js 并遇到一个问题:我想更改斜杠之前的 URL 部分,例如在目录中浏览时的 github ( https://github.com/browserstate/History.js/ )。我的代码现在看起来像这样:

  History.pushState(null, "Program od: "+programBack, "program/"+day);

当我多次按下按钮时,url 更改为:program/program/program/6-10-2011,因为 history.js 仅更改 / 之后的部分。

有什么办法可以在 History.js 中处理这个问题吗?谢谢

4

1 回答 1

3

If the question is how to get history.js to use absolute/full urls instead of relative urls, then change "program/"+day to "/program/"+day

于 2011-11-09T10:51:53.173 回答