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
Release: 2016-05-16 17:02:13
Original
980 people have browsed it

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");
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template