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