Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of automatically adding pre tags to ajax return values

Shulou Source: shulou.com Published: 2022-06-03 08:21:22 10月06日 Update

This article mainly explains "how to solve the problem of automatically adding pre tags to Ajax return values". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to solve the problem of automatically adding pre tags to ajax return values"!

Ajax returns, automatically adding pre tags

AJAX returned content, unexpectedly automatically added tags

In FF, ie, Google Chrome, each return is different: ff lowercase, ie uppercase, Google plus style

Check it out, it turns out that the returned type is wrong.

Final resolution result, modify return type of generic handler

put

context.Response.ContentType = "text/plain";

modified to

context.Response.ContentType = "text/html";

At this point, I believe everyone has a deeper understanding of "how to solve the problem of automatically adding pre tags to ajax return values." Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Tags questions content type learning wrong practical deeper interest uppercase practical lowercase easy to operate method more friends browsers programs results Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi macOS vpn Huawei Shulou Information