如题
代码这样写的
- Java code
response.getWriter().print("<script>alert(\"用户名或密码错误!\");document.location='index.jsp';</script>");
在IE9下是直接把这代码打印出来了,在低版本IE没问题,请问是怎么回事???
------解决方案--------------------------------------------------------
需要写Content-type
response.getWriter().print("<script>alert(\"用户名或密码错误!\");document.location='index.jsp';</script>");