java中编写弹出框

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wanggeying/article/details/83415543

String message="数据已入库,导入成功!";        

try {
            response.setContentType("text/html; charset=UTF-8"); //转码
            PrintWriter out = response.getWriter();
            out.flush();
            out.println("<script>");
            out.println("alert('"+message+"');");
            out.println("history.back();");
            out.println("</script>");
         } catch (IOException e) {
            e.printStackTrace();
         }

猜你喜欢

转载自blog.csdn.net/wanggeying/article/details/83415543