2

我怎么能控制#!在 url 中假设我有以下 url

http://www.facebook.com/#!/video/video.php?v=1106030301789

现在 facebook 如何#!在 url 中控制它....

4

3 回答 3

3

http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html - 这可能会解释一点:-)

于 2010-09-17T12:41:18.820 回答
1

看看sammy.js

$.sammy(function() {

  this.get('#/', function() {
    $('#main').text('Welcome!');
  });

});

route.js

route('#/Learn').bind(function(){ 
    Alert('Alert1'); 
}); 

还有一种标准方法可以使用html5 中的新 popstate 事件

于 2010-09-17T12:47:30.583 回答
0

简短的回答是:通过 Ajax

Ajax 允许主页动态加载内容而无需刷新页面

于 2010-09-17T12:41:26.837 回答