In the recent property project, there is a home page information display function, to achieve this function is not very complex, of course, first of all think of using asynchronous to achieve.
When the request returns data processing, the return result that pops up on the page is inconsistent with the output in the console, the result of the pop-up on the page is that the four digits of the real result are processed 0. The reason for this is because the argument was not passed as a string at the time of the pass, that is, show (' 123456789876543212 '), so JavaScript automatically treats the following as the number type by 0.
This involves the use of the JavaScript relay, which first introduces several escape characters:
\ '-single quotes, \ '-double quotes, \&-and numbers, \/backslash, \ n-line feed, \ r-Carriage return, \ t-tab, \b-backspace, \f-page break;
As for the specific how to achieve, look at the picture as an example