开发者社区> 问答> 正文

jQuery 如何重定向页面?

使用 jQuery 如何将页面重定向到另外一个地址上?

展开
收起
a123456678 2016-07-08 16:21:05 3300 0
1 条回答
写回答
取消 提交回答
  • 直接 location.href = 'http://www.oschina.net/'; 不就搞定了吗

    // simulates similar behavior as an HTTP redirect
    window.location.replace("http://www.oschina.net/");
     
    // simulates similar behavior as clicking on a link
    window.location.href = <a href="http://www.oschina.net/" rel="nofollow">http://www.oschina.net/</a>;
    2019-07-17 19:53:37
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
23-Vue.js在前端...1506518547.pdf 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载