Home >Web Front-end >JS Tutorial >jquery ajax under firefox returns object XMLDocument processing method_jquery

jquery ajax under firefox returns object XMLDocument processing method_jquery

WBOY
WBOYOriginal
2016-05-16 17:02:13979browse

When using jquery ajax to process struts2 under firefox and return the json type, the successful return result of ajax is [object XMLDocument].

Solution: Add a line of code in front of getWriter.print();

Copy the code The code is as follows:

ServletActionContext.getResponse().setContentType("text/html;charset=UTF-8");
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn