核心代码:方法参数要有response
response.setContextType("text/html;charset=UTF-8");
PrintWrite out = response.getWrite();
out.write("<script type='text/javascript'>alert('这是一个弹出框!');window.close();</script>");
out.flush();
out.close();
本文共 273 字,大约阅读时间需要 1 分钟。
核心代码:方法参数要有response
response.setContextType("text/html;charset=UTF-8");
PrintWrite out = response.getWrite();
out.write("<script type='text/javascript'>alert('这是一个弹出框!');window.close();</script>");
out.flush();
out.close();
转载于:https://www.cnblogs.com/wxm-bk/p/7381936.html