我正在尝试使用davis.js历史插件,但我遇到问题(使用codeigniter,但这并不重要)。
var app = Davis(function () {
this.get('http://localhost/folder/controller/:id', function (req) {
alert("Hello " + req.params['id'])
})
})
app.start()
和链接:
<a href="http://localhost/folder/controller/2">ID</a>
以这种方式它不起作用,因为它是完整的地址,我怎么能让davis看起来完整的地址?
或者你可以建议我另一个插件?
答案 0 :(得分:0)
找到相对网址的解决方案..