【发布时间】:2015-12-14 16:43:55
【问题描述】:
我打算用 AJAX 做一个网站。
目前我用“#”更改我的主要内容:
例如example.com/#home --> example.com/#site1
我设法在主题标签更改时更改内容。
但现在我想使用我从谷歌知道的方法。
example.com/home/ --> example.com/site1/
到目前为止,我知道如何在不重新加载页面的情况下更改 URL。 (Modify the URL without reloading the page) 我的问题是如果用户重新加载网站或使用导航按钮,他将登陆example.com/site1/index.php 而不是example.com/index.php。
但是将数据 (site1) 发送到脚本很重要。
希望你能理解我的问题。
【问题讨论】:
标签: javascript php jquery ajax hashtag