Lup*_*upo 2 javascript anchor redirect
我有一个小问题:如果用户访问一个特殊网站,http://www.test.de我想根据设计原因自动添加一个锚点到该网址 - >结果http://www.test.de/#welcome.
10秒后,我想将锚更改为http://www.test.de/#thankyou
这有可能吗?也许用window.location?
大thx任何帮助!
你可以window.location.hash在这里使用
window.onload = function(){
window.location.hash = 'welcome';
setTimeout( function(){
window.location.hash = 'thankyou';
}, 10*1000);
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2183 次 |
| 最近记录: |