【问题标题】:SWFAddress and AJAXSWFAddress 和 AJAX
【发布时间】:2009-12-30 16:19:19
【问题描述】:

我想在 AJAX 项目中使用 SWFAddress。在网站上有一些例子,但任何教程。 您知道在哪里可以找到在我的网站上实施 SWFAddress 的快速指南吗?

谢谢

【问题讨论】:

    标签: ajax swfaddress


    【解决方案1】:

    我也没有找到任何文档,但我想这是实现它的最简单方法:

    1- 在你的 document.ready() 中添加这个函数

     SWFAddress.onChange = function() { //on url change
        try {
            var thePath = SWFAddress.getPathNames(); //get&split url
            if (thePath[0] == 'one') go('one'); //if url is #one do something
            if (thePath[0] == 'two') go('two'); //if url is #two do something
        } catch(e) {}
     } 
    

    2- 在您的链接上添加适当的锚点 (a href="#one")。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多