没有找到任何帮助搜索...
我要做一些事情,比如将外部 php 文件的内容加载到我的 index.php 上的 div 容器中;为此,我在超链接的 href 中添加了一个 javascript 调用,该调用调用如下函数:
function contentloader(e){
switch(e){
case "profil":
$("#content").load("profil.php");
this.href('#profil');
break;
case "einstellungen":
$("#content").load("einstellungen.php");
break;
case "freunde":
$("#content").load("freunde.php");
break;
}
}
实际上这很好用,但现在我正在寻找一种可能性,在加载这样一个内容 php 文件后更改我的 index.php 的 url ......例如,应该可以为 index.php#profile 保存一个书签index.php#einstellungen
有没有人提示我搜索或做类似的事情???帮助表示赞赏!
(此外,那些外部 php 文件将包括复杂的 php 代码、mysql 请求等......)