如何在django的新标签页中打开网址?

时间:2022-09-22 18:13:43

i have to open the result page using render_to_response on a new tab

我必须在新选项卡上使用render_to_response打开结果页面

2 个解决方案

#1


7  

Django is server-side, opening in a new tab is client-side. So use an <A> with a target="_blank"

Django是服务器端,在新选项卡中打开是客户端。所以使用带有target =“_ blank”的

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=target%3Dblank

But of course spawning new windows/tabs is annoying for the user, so try not to do that after all.

但是当然产生新的窗口/标签对用户来说很烦人,所以尽量不要这样做。

#2


1  

Most the time, loading the page in a new tab can be a real pain in the ar** for the user. Nevertheless it can still be necessary sometimes. If you really need to render your POST results in a new tab, use the target="_blank" as an attribute of your <form>.

大多数情况下,在新选项卡中加载页面对于用户来说可能是一个真正的痛苦。尽管如此,它有时仍然是必要的。如果您确实需要在新选项卡中呈现POST结果,请使用target =“_ blank”作为

的属性。

#1


7  

Django is server-side, opening in a new tab is client-side. So use an <A> with a target="_blank"

Django是服务器端,在新选项卡中打开是客户端。所以使用带有target =“_ blank”的

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=target%3Dblank

But of course spawning new windows/tabs is annoying for the user, so try not to do that after all.

但是当然产生新的窗口/标签对用户来说很烦人,所以尽量不要这样做。

#2


1  

Most the time, loading the page in a new tab can be a real pain in the ar** for the user. Nevertheless it can still be necessary sometimes. If you really need to render your POST results in a new tab, use the target="_blank" as an attribute of your <form>.

大多数情况下,在新选项卡中加载页面对于用户来说可能是一个真正的痛苦。尽管如此,它有时仍然是必要的。如果您确实需要在新选项卡中呈现POST结果,请使用target =“_ blank”作为

的属性。