The div passed through ajax does not have the original effect.
$ Table ="
<>
"; $ Result = array ('table' => $ table); echo json_encode ($ result );
This is an image to enlarge the display effect. it's okay if I put it on the page directly, but those effects won't work if I pass it through ajax.
Reply to discussion (solution)
How is your js code written? You can check whether an error is returned on the console.
How js obtains and displays json data on the server.
$ ('Your container element'). append ($ ('json data returned by the server, it should be html tag content ').
This is a bit superfluous. why do you need to convert a string to json. Can it be returned directly.
1. php
$ Table ="
<>
"; Echo $ table;
$. Get ('1. php', function (data) {$ ("parent container"). append (data );})
Your current code does not work either when you get the json value or when some special characters are escaped, even if the page is correctly retrieved, it is not parsed.
However, we recommend that you directly return the string