DWQA QuestionsCategory: ProgramRequesting data using jQuery Ajax occasionally results in a direct display of JSON files on a Web page
haha214 asked 2 weeks ago

RT, using jQuery Ajax to request data occasionally appears to display JSON files directly on the web page. Normally, the required JSON data can be obtained and processed in a series of ways, but occasionally, the JSON data will appear directly on the web page.Requesting data using jQuery Ajax occasionally results in a direct display of JSON files on a Web page
I would like to ask what may be the cause of this situation.
callbackRequesting data using jQuery Ajax occasionally results in a direct display of JSON files on a Web page

4 Answers
Light key fast code answered 2 weeks ago

No judgment when data.data.code = = 0

linong replied 2 weeks ago

When data. data. code = 0, don’t you just execute else directly? Data is response on the server side. It should have nothing to do with printing.

jaye answered 2 weeks ago

Don’t double-click to open it, it won’t open locally

heyudely answered 2 weeks ago

Do you know the reason? I just learned, but I also met this situation. After a long time of searching, I didn’t find the answer. I feel that many blogs are the same, without innovation, and it’s useless to waste a lot of time reading. Fortunately, I saw the landlord. I begged for advice. ???

Liu Cheng Lin answered 2 weeks ago

I also encountered the same problem. How can the landlord solve it?