Django. How to redirect to url with fragment ident

2019-08-12 17:45发布

For example in some cases after POST or GET request I want to redirect user not only to specific page, but to a specific part of page. What would be better: implement this in Django(reconstruct redirect url?) or implement this in javascript?

1条回答
手持菜刀,她持情操
2楼-- · 2019-08-12 18:03

Why would you want to do it in JS? If you're redirecting to a different page already, just add #whatever to the redirect URL to go direct to the anchor.

查看更多
登录 后发表回答