开发者

how to redirect a URL to a new browser window using sendRedirct(URL)?

I am using a Spring, where i try to response.redirect to a new window. i am not able do it. it just calls the urL in the same browser window. h开发者_StackOverflow社区ow do i make redirect to a new window..?

is there any other options to do that?


You can't do that server-side only.

You can make the request itself in a new window using the target attribute of <a> or <form>:

<form target="_blank">..</form>

Or you can use ajax:

  1. request a resource
  2. return (print as response) the desired target url
  3. use window.location.href = returnedUrl
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜