我想在AJAX项目中使用SWFAddress。在网站上有一些例子,但没有任何教程。您知道在我的网站上哪里可以找到实现SWFAddress的快速指南吗?
谢谢
发布于 2010-01-02 22:16:51
我也没有找到任何文档,但我想这是实现它的最简单的方法:
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-在你的链接上添加适当的锚(一个href="#one")。
https://stackoverflow.com/questions/1981009
复制相似问题