最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to redirect to root page in jQuery? - Stack Overflow

programmeradmin3浏览0评论

I'm now redirecting to main page in my Rails application using

redirect_to root_path

I want to do the same in jQuery.

i.e. window.location.replace("???");

How to do that?

I'm now redirecting to main page in my Rails application using

redirect_to root_path

I want to do the same in jQuery.

i.e. window.location.replace("???");

How to do that?

Share Improve this question edited Sep 18, 2014 at 9:45 sgi asked Mar 10, 2010 at 12:12 sgisgi 2,0326 gold badges21 silver badges28 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 16

window.location = '/'

Disadvantage in using window.location.replace('/') is user won't be able to press "Back" and go back to the previous page.

发布评论

评论列表(0)

  1. 暂无评论