<form action="提交的action" method="post" target="theID"> ..................... </form> <iframe name="theID" style="display: none;"></iframe>
String script = "<script>alert('ok!');</script>"; response.getOutputStream().write(script.getBytes("utf-8"));