返回 js字符串让页面跳转

String sc= "<script type=\"text/javascript\" >window.location.href = \""+url+"\";</script>";
ctx.request().response().putHeader("Content-Type", "text/html;charset=utf-8");
ctx.request().response().setStatusCode(200).write(sc).end();

url 可以带参数

posted on 2018-07-21 21:43  --LP--  阅读(492)  评论(0)    收藏  举报

导航